Jason Lewis, a Republican congressman from Minnesota who just lost his re-election bid, has come up with a counterintuitive take on the Democratic takeover of the House: It's the fault of John McCain, the Republican senator from Arizona who died in August.

McCain's July 2017 vote against Republican legislation to repeal and replace Obamacare, Lewis argues, deprived Republicans of the ability to prove the critics of that legislation wrong.

Lewis is being panned for blaming his and others' defeats on a dead man, especially a war hero, and even more especially for doing it in an op-ed that appeared on Veterans Day. Leaving questions of taste aside, there are glaring flaws in Lewis's argument. But let's give Lewis his due before going into them. It is not impossible, as paradoxical as it may sound, that passing highly unpopular legislation might have helped Republicans.

Lewis has a reasonable case on that point, although he overstates it. Passage would not have made Republican legislation popular, but could well have undercut the ubiquitous predictions of its catastrophic effects.

Various iterations of the legislation were said to be likely to cause 22 million or 23 million people to lose their health insurance. That wouldn't have happened: The claim was based on a distortion of a Congressional Budget Office projection. The CBO later tacitly admitted that the projection was too high, and some of the projected losses were supposed to take longer to materialize than most people realized.

Passage of legislation might also have made it clearer that states were not going to start a stampede to deprive people with pre-existing conditions of protections - and that Republican legislation required all states to maintain a significant degree of protection.

On the other hand, Lewis discounts the possibility that Republicans would have paid a price at the ballot box because their legislation would have allowed insurers to raise premiums for near-retirees and cut them for younger people. That trade-off may have made sense as a policy, but older people would have been unhappy and more likely to vote on the issue.

While Lewis is uncharitable in attributing McCain's vote to his personal hostility toward Trump, it is also true that McCain's stated grounds for that vote were hard to reconcile with other aspects of his record. He said he wanted a more regular legislative process in which Obamacare legislation would move through congressional committees and pass with bipartisan support.

Since there was no way that Democrats were going to agree to any conservative or center-right Obamacare replacement, that amounted to saying that he was in practical terms willing to see Obamacare continue. It was very far from his previous campaign pledge to lead the fight against the health-care law.

By the time McCain voted no, the Republican legislation had been stripped down to a repeal of Obamacare's fines on people who declined to purchase insurance compliant with the law's regulations. Republicans hoped to take that "skinny repeal" to a conference committee with the House, which had passed wider-ranging changes to Obamacare, and then pass a new bill through both chambers.

This procedural history is worth keeping in mind for two reasons.

The first is that it makes McCain's decision harder to defend. A few months later he would express his support for a Republican tax law that got rid of those fines, too - a law that, in other words, had the same key provision as the bill he killed. Since he had no serious objection to the skinny bill's actual substance, he could have voted yes in July and then waited to see whether the conference committee devised something worth enacting.

The second is that it means that Republicans weren't actually close to the finish line on health-care legislation. Lewis is neither the first nor the most prominent Republican to encourage the misimpression that but for McCain, Republicans were sure to achieve victory on health care. In one of his many shots at McCain over the issue, President Trump said that but for his vote, "We almost got rid of Obamacare."

No, they didn't. Republicans couldn't come up with an Obamacare overhaul with majority support in the Senate. That's why they were reduced to the desperate procedural gimmick of skinny repeal.

If Republicans had some version of Obamacare legislation that could win 51 Senate votes, they would have passed that bill before a conference. A committee was not going to devise an attractive new approach to health policy that none of the senators had previously imagined. The gambit was based on something pretty close to magical thinking.

Senator McCain certainly did not help the party get health-care legislation enacted, and his decisions were open to criticism. (The same is true, by the way, of the other Senate Republicans who voted no: Susan Collins of Maine and Rand Paul of Kentucky, who haven't gotten as much criticism from Trump as McCain did because it's the late senator's biting criticism of the president that the latter really resented.)

But McCain has functioned as a scapegoat for broader failures by his party on health care. What Lewis is doing now is making him a scapegoat for the midterm elections, too.