The health care legislation proposed by Senate Republicans is a moral abomination—one that leadership is trying to pass through undemocratic means. Some of the villains responsible for this are obvious, starting with Donald Trump, Paul Ryan, and Mitch McConnell. But one conservative who played a major role in making the passage of an awful, widely despised bill frighteningly likely is flying under the radar: the chief justice of the Supreme Court.

John Roberts received a lot of praise from liberals for casting the swing vote in 2012 to mostly uphold the Affordable Care Act. But his decision in the case NFIB v. Sebelius to ham-handedly re-write the ACA’s Medicaid expansion denied a lot of people health insurance, made the Republican demolition of Medicaid more likely, and ensured that the death and suffering caused by TrumpCare will be harder, perhaps impossible, to fix.

It’s not just Roberts, of course. Seven justices voted to hold that Obamacare’s Medicaid expansion was optional for states, rather than a requirement to receive existing Medicaid funds. The Court’s five Republican nominees were joined by Obama nominee Elana Kagan and Clinton nominee Stephen Breyer. I think it’s overwhelmingly likely that the votes of Kagan and Breyer were strategic gestures intended to solidify Roberts’s decision to vote to uphold the ACA (after, apparently, initially voting to strike it down entirely). But it doesn’t matter—whether Kagan and Breyer voted sincerely or not, this holding is one of the very worst handed down by the Roberts Court, and it changed the political dynamics surrounding health care in critical ways.

The direct consequences of the decision were bad enough. Nineteen states still haven’t taken the Medicaid expansion, with the result that millions of poor, disabled, and/or elderly people are being denied insurance. But the indirect effects have also been very bad. The utter decimation of Medicaid is at the core of TrumpCare (it is even worse in the Senate version than in the House one). This would have been a lot harder to pull off if those 19 holdouts—all of them Republican-controlled—had taken the expansion money.

A new study shows that when a state took the Medicaid expansion, its residents became more likely to support the ACA. It would be more difficult to wreck Medicaid if more Republican voters had benefitted from the expansion. As the policy analyst Sean McElwee acidly put it, “The Republican Party’s strategic choice to brutalize their own voters by denying them health care basically worked.”

It would be one thing if these awful consequences came from a decision with a compelling legal basis. But the Medicaid expansion holding in Sebelius was, at best, a massive stretch. Nothing in the text of the Constitution places explicit limits on the conditions the federal government can place on money it offers to the states.

When the Supreme Court held in 1987 that it was constitutional for the federal government to use the threatened withholding of federal highway funds to create a de facto national drinking age of 21, it argued that the Constitution places implicit limits on the ability of the federal government to coerce the states to achieve national objectives. But the implication of the decision was that, if there were a case in which conditions on federal spending power were unconstitutional, it would involve an indirect objective only obliquely related to the central purpose of the spending. Nothing in the Court’s decision suggested to Congress that a straightforward condition—such as, “if you want Medicaid money you have to accept the conditions of the Medicaid program”—would be unconstitutional. In fact, the conditions placed on states that take Medicaid had been changed many times before the ACA.

Far from having the compelling legal basis that would be needed to justify its sweeping implications, the Medicaid expansion holding in Sebelius is a ludicrously incoherent mess.

This matters a great deal going forward. Let’s say President Kirsten Gillibrand takes over in 2021 with Democratic majorities in both houses of Congress. One of their top priorities will be to fix the damage inflicted by the Medicaid cuts, which in the Senate’s version of TrumpCare will phase in fairly slowly. How can Congress be sure its attempts to restore funding won’t be found to be unconstitutionally “coercive” changes to Medicaid spending? The answer is, it can’t be sure. Sebelius didn’t create any kind of workable standard, providing no meaningful guidance to Congress about how far is too far. And even worse, the more people a restored Medicaid insures, through new conditions on the disbursement of Medicaid funds, the more likely it is to be struck down. It’s a truly perverse situation.

One answer is to bypass the spending power issues by simply making a greatly expanded Medicaid a purely federal program like Medicare. Only this creates its own problems. While Roberts voted to uphold the mandate in the ACA as a valid use of the taxing power, he found that it exceeded Congress’s powers under the Commerce and Necessary and Proper clauses. Especially if Trump and McConnell are able to confirm one or two more justices, there’s a real chance that expanded public insurance programs might be struck down based on whatever quarter-baked constitutional argument cooked up on a conservative legal blog sounds best to the Republican Supreme Court nominees.

The Supreme Court not only made the destruction of Medicaid more likely—it also handicapped future efforts to repair the damage and provide genuinely universal insurance. There are many institutional barriers facing health care reformers in the United States, and the Supreme Court is likely to continue to be one of them.