“We should look to countries like Denmark, like Sweden and Norway and learn from what they have accomplished for their working people,” Sen. Bernie Sanders said Tuesday at the Democratic presidential debate in Las Vegas.

Lovers of capitalism have been eager to point out to Senator Sanders, a self-described socialist, that Denmark’s markets are at least as free as America’s. “For those of you who are keeping score, the Heritage Foundation, which literally keeps score, rates Denmark’s economy as slightly more free – slightly more capitalistic — than that of the United States,” notes Kevin Williamson of the National Review.

Marian Tupy of the Cato Institute, writing at FEE, points out that Denmark actually wallops the United States in measures of free trade and ease of doing business. “The one area where the United States might not want to copy Denmark,” Tupy says, “is the size of government, which is a proxy measure of taxation and redistribution.”

Of course, this is the bit of Denmark’s system Bernie Sanders does want to copy. And why shouldn’t we, if Denmark is nevertheless more economically free than the United States? Tupy doesn’t say.

Right-leaning arguments about the free-market marvel that is Denmark cut both ways. Denmark shows us that a much larger public sector and a much more robust social-insurance system need not come at the expense of a dynamic market economy. In other words, Denmark shows us that capitalism and a large welfare state are perfectly compatible and possibly complementary.

The lesson Bernie Sanders needs to learn is that you cannot finance a Danish-style welfare state without free markets and large tax increases on the middle class. If you want Danish levels of social spending, you need Danish middle-class tax rates and a relatively unfettered capitalist economy. The fact that he’s unwilling to come out in favor of either half of  the Danish formula for a viable social-democratic welfare state is the best evidence that Bernie Sanders is not actually very interested in what it takes to make social democracy work. The great irony of post-1989 political economy is that capitalism has proven itself the most reliable means to socialist ends. Bernie seems not to have gotten the memo. But Bernie Sanders isn’t the only one failing to come to terms with the implications of Danish social-democratic capitalism.

The lesson free-marketeers need to learn is that Denmark may be beating the U.S. in terms of economic freedom because it’s easier to get people to buy in to capitalism when they’re well-insured against its downside risks. That’s the flipside irony of free-market “socialism.”

Now, there’s no way American social spending is ever going to approach that of an ethnically homogeneous country the size of Minnesota. Nevertheless, it may well be the case that redistributive democratic socialism, as it is practiced in the Nordic social democracies, is as effective a means to capitalist ends as capitalism is as a means to social-democratic ends. If so, the reason the U.S. is lagging so far behind big-government Denmark on free trade, corporate taxation, ease of doing business, and more may very well be that the American safety net isn’t good enough, and economic insecurity at the bottom and middle makes free-market policies a tough sell to anxious American voters.

I don’t know that this is true. But, then again, libertarians and free-market conservatives don’t know that it’s not. Mostly, ideological American capitalists really badly want to believe it’s not true that we’re falling behind Denmark as capitalists because we’re not redistributive enough. (I mean, the previous paragraph made me feel like I was channeling E.J. Dionne, which was … unsettling. But let us put away childish things.) Because if it is true, and social insurance and capitalism are complementary in this way, then champions of economic liberty will be forced to face up to the possibility that attacking the welfare state undermines support for laissez faire economic policy. Some of us might even be forced to choose between our love of capitalism and dislike of the welfare state. Awkward.

The possibility that generous social insurance can bolster support for capitalism is worth taking seriously, not only because the truth (whatever it is) is important in its own right, but because the truth of the matter could have profound implications for other libertarian policy priorities.

For example, libertarians sometimes like to point out that increased immigration undermines support for the welfare state, as if that’s a good thing—a libertarian two-for-one! More immigration, less progressive redistribution! Let ’em pour in! So the thinking goes.

But suppose weakening the welfare state does lead to an erosion of support for economic freedom. Suppose. In that case, more immigration may come at the expense of freer markets. If you strongly favor a much more open immigration policy and much freer markets, as I do, then this lesson of the Danish capitalist welfare state—supposing it is a lesson—makes life difficult. If you want both those things—more immigration and more capitalism—you’ll be forced to think hard about how to (a) shore up the safety net in a way that (b) maintains the sense of baseline economic security that makes relatively unregulated markets seem tolerable, while also (c) assuring the taxpayers who are footing the bill for the welfare state that migrants can’t just stroll in and get free stuff at their expense.

That’s a hard nut that I don’t know how to crack. It would be nice to think I didn’t need to crack it. And immigration is just one example of how standard right-leaning thinking might have to change if it turns out that a weak safety net does tend to reduce political support for free markets. It would be convenient to just look the other way and go on, like Bernie Sanders, clinging to what we think we know. But if we American capitalists are going to insist that Bernie Sanders face up to the free-market nature of Danish social democracy, then basic intellectual honesty requires that we equally acknowledge the social-democratic basis of Danish economic freedom. It’s not impossible that wrestling seriously and honestly with the implications of the Danish model will leave the priorities, arguments, and political strategy of sophisticated free-market conservatives and libertarians untouched—but it is pretty unlikely.