Millionaires are qualifying for Obamacare subsidies meant to assist low-income Americans who are unable to afford health care, thanks to a flaw in the law.

Carolyn McClanahan, a financial adviser and medical doctor in Florida, told CNBC she has advised at least five of her millionaire clients to enroll in health care plans under the Affordable Care Act because their taxable incomes make them eligible for government subsidies.

Those clients, McClanahan said, each have a net worth ranging from $1 million to $3 million.

Because eligibility for Obamacare tax credits is determined by income, not net worth, assets aren’t taken into account. This allows the financial adviser’s millionaire clients to save between $4,600 and $8,800 in annual premium payments—with taxpayers covering those amounts.

CNBC also reported that wealthy individuals with taxable incomes low enough to meet another Obamacare subsidy threshold are qualified to receive tax credits to help cover copayments, co-insurance, and deductibles.

Ed Haislmaier, a senior research fellow in health policy at The Heritage Foundation, told The Daily Signal:

Essentially, what you’ve got is a system where the government is handing out an income support benefit without determining whether or not somebody has assets. If a person has significant assets, they don’t really need income support, because they can tap their assets if they need more money to cover their expenses.

All of McClanahan’s clients retired before turning 65, meaning they no longer receive health insurance through their employers but are not yet eligible for Medicare.

Although each client’s net worth was in the millions because of investments and real estate, CNBC reported, their taxable incomes were low enough after retirement for them to qualify for the tax credits.

“It’s not so much a loophole as it is a logical consequence of the design, which is really more of a welfare benefit design than a health care design,” Haislmaier said.

This isn’t the case solely for Obamacare’s subsidized exchange coverage; Medicaid has a similar workaround.

Haislmaier pointed out that the Affordable Care Act also removed asset tests from Medicaid’s eligibility requirements, except for long-term care benefits.

This means states that have adopted the Medicaid expansion, which was intended for poor individuals, now may enroll wealthy individuals who have low incomes. Haislmaier said:

That creates a number of interesting interactions, where somebody can have, for example, significant assets but low income and therefore qualify for tax credits or Medicaid if they’re in the right income range and their states adopted the Medicaid expansion.

A major reason for these effects, he said, is that the Affordable Care Act was set up as an income-related welfare benefit and tied to the tax code.

“Basically, the people who designed the ACA were a subset of liberals who were focused on issues of income to the exclusion of other considerations,” Haislmaier said. “So this functions in the way it was designed and written.”

The only way to fix the problem, he said, is to overhaul the law and redesign it so that assets are accounted for.