Using Counterfactual Tasks to Evaluate the Generality of Analogical Reasoning in Large Language Models