According to counterfactual theories of causal judgment, people judge causation by evaluating the consequences of counterfactual interventions on their representations of the world. These representations are often modeled using the formalism of Structural Causal Models. We argue that this assumption underestimates the richness of human causal cognition. Structural causal models can represent what people know about one particular causal system, but they provide an incomplete account of people's capacity to export this knowledge to other contexts. Research on causal generalization suggests that people hold `invariant' representations of causal relationships, that can be composed together in a flexible way. We suggest that people can compute counterfactuals over such invariant representations of causal relationships, and in particular they can imagine `disconnecting' the causal link between two variables. This hypothesis can explain why the mind makes a distinction between `productive’ and non-productive causation, a phenomenon that challenges counterfactual theories. In a series of simple experiments, we find that the consequences of variable-disconnection counterfactuals systematically affect people’s causal judgments, even holding constant the underlying causal model. Overall, the counterfactual framework might provide a unifying account of human causal judgment, provided we correctly understand the mental representations people use to imagine counterfactual scenarios.