This article first appeared on the Hoover Institution site.

As the proposed American Health Care Act ( AHCA ) moves to the Senate, the Republican agenda to “repeal and replace” Obamacare faces major obstacles.

Two of the knottiest provisions in the GOP’s complex legislative package deal with how insurance carriers may set premiums for their customers. As a general matter, the cost of health care rises with age: older people cost more to insure than younger people, often a lot more.

Are insurance carriers entitled to take those differences into account in setting rates?

The second question involves the supply of insurance for persons who have preexisting conditions—a trait that makes them more expensive to insure.

Everyone agrees that the Affordable Care Act is under stress as major insurers continue to exit the individual market because of an inability to cover their costs. But there is widespread disagreement about what, if anything, to do next.

As is so often the case, it is easy for legislation to impose new regulations on the insurance markets. It is a lot harder to figure out how, if at all, to undo the mess.

The House bill faces rough sledding in the Senate, and the prognosis for sensible reform is bleak. To see why, it is necessary to go back to first principles.

Under a competitive market system for individual insurance, all individuals have to pay the full freight to get coverage for their potential risks, because cross-subsidies between different classes of customers can never survive. In order to give some individuals lower rates, other individuals have to be charged amounts that exceed the accurate estimated costs of their conditions.

Since other alternative insurers are by definition available, these overcharged individuals will migrate to another insurer that does not impose the subsidy surcharge. Any insurer that persists in undercharging their high-risk patients will therefore be on the rapid road to bankruptcy.

Related: Robert Reich: Republicans Will Come to Regret Cruel Trumpcare

Even without these cross-subsidies, the overall system remains in equilibrium because all potential insureds, whether high- or low-risk, only enter into contracts from which they are net winners: therefore, even high-risk customers, paying high premiums, get the primary advantage of insurance by being able to average out their income over future uncertain states of the world.  

The great but unappreciated advantage of this market system is that it is perfectly steady. No one has to worry about who else is in their insurance pool, because their rates are stable in the absence of cross-subsidies.

05_21_Trumpcare_Flaw_01 New England Patriot’s Julian Edelman visits a sick child at Boston Children’s Hospital February 25, 2016 in Boston, Massachusetts. Darren McCollester/Getty

In this type of system, individuals have an incentive from an early age to enter into long-term coverage arrangements that will protect them through guaranteed renewal at specified rates in the event that their health condition turns for the worse.

But now that the Affordable Care Act embedded these cross subsidies, it is better to tilt at windmills than to try to undo the rock-solid political consensus against a pure market solution on both sides of the political aisle.

Even the Republican plans preserve major subsidies. But these are not large enough to satisfy the critics. Thus the American Medical Association, whose members benefit from a continued influx of public money into the system, hit both points hard:

The bill passed by the House today will result in millions of Americans losing access to quality, affordable health insurance and those with pre-existing health conditions face the possibility of going back to the time when insurers could charge them premiums that made access to coverage out of the question.

There is indeed little doubt that the legislation will reduce the total subsidies now moving from rich to poor people.

During his campaign, then-candidate Trump wrote that he “does not believe health insurance carriers should be able to refuse coverage to individuals due to pre-existing conditions.” That leaves open the question of how much more, if anything, high-risk patients can be charged relative to others.

The key provision of the AHCA fudges this particular question, by saying that its legislation does not allow health care insurers “to limit access to health care coverage for persons with preexisting provisions.” But that provision would not prevent them from increasing the cost of coverage so as to reduce or eliminate the amount of the implicit subsidy.

Related: Trumpcare: The CBO’s Report on the GOP Health Plan is Alarming

In addition, there is also fierce resistance to those provisions in the AHCA that would allow the states to raise the community rating differential so that insurers could increase from three-fold to five-fold the rate differential between their youngest and oldest customers, in order to reduce that cross-subsidy.

Such intense opposition to these key AHCA provisions is indicative of the huge difficulties that it takes to manage cross-subsidies. If these are kept too large, as they are under the current Affordable Care Act, then insurance in the individual market will implode because young people will flee from plans that offer them a raw financial deal.

But if the level of the subsidy is reduced, then the cost of existing coverage for older insureds will necessarily skyrocket, so that they will be forced to leave their plans.

One possible way to control this problem is for the federal government to cover the costs of the needed subsidies from general revenues, which would make their cost explicit, by putting it on the budget, allowing for a political debate about the size of the subsidy. But elected officials are reluctant to raise taxes, and even when they do, there is a real question of whether the funds set aside are sufficient to cover any shortfall that might exist.

The simplest way to attack the size of the subsidy is to reduce the set of benefits that are included in the health plan. On this score, the rich set of essential medical benefits under the ACA are far more extensive than those provided in any voluntary market, which is a good sign that they should be pared back in ways that make coverage more affordable.

Private insurance companies in an unregulated market can alter their product mix in response to changes in cost and demand. But government programs face huge rigidities in this regard, because every type of current service supplier will lobby furiously to make sure that its benefits survive the financial axe.

The new bill does not attack this problem directly, but allows for states to gain waivers from the essential benefits, inviting a massive political battle as to which particular benefits will be cut and why.

At the same time, it is hard to see what progress can be made in dealing with preexisting conditions. Thus under the House version of the AHCA, states may seek waivers that allow insurers to charge more for preexisting conditions, but only if they set aside sufficient funds to help those hurt by the rise in market rates.

The AHCA contains $138 billion to deal with the issue, to be divvied up among 50 states to help them reach their goal. But, as with essential minimum benefits, this provision raises at least as many questions as it answers.

It is never clear whether these funds are sufficient to cover the shortfall, and, if so, how they are to be allocated across the states. Nor is it clear just how much funds any state must commit to the program in order to make the waiver good.

The AHCA does not set up a competitive market in which each firm makes its own pricing system. What it does is propose an alternative system with a different set of coverage formulas and cross-subsides that no one can figure out how to price in advance, which accounts for some of the intense opposition to the legislation.

A better approach toward this issue is to control the opportunism that exists right now in dealing with these conditions. The ACA gives individuals a wide latitude of periods over which they can sign up. People who learn that they have preexisting conditions can thus swoop down on the system in order to receive some needed surgery or expensive drug treatment, only to opt out once their course of treatment is over.

The net result is a raid on the treasury that makes it harder for others to remain long-term participants within the system. The current legislation has a proposal that permits a 30 percent price increase that lasts for one year if the gap between jobs is 63 days or longer. But again, there is a serious Goldilocks problem. No one knows whether the 30 percent increase is too large, too small, or just right. Nor is there any way to figure this out in advance before the legislation becomes law.

It is discouraging, to say the least, that the Republican project is so flawed.

Obamacare’s dismantling of the voluntary market is not easily repaired, given that all has happened since 2010. The overall lesson is that politicians should be aware that the evident pitfalls of existing markets might well be far smaller than those of the untried legislative systems that replace them.

Richard A. Epstein, the Peter and Kirsten Bedford Senior Fellow at the Hoover Institution, is the Laurence A. Tisch Professor of Law, New York University Law School and a senior lecturer at the University of Chicago.