When California made its last annual budget, there were plenty of goodies for liberals in the famously blue state.

“The budget provides $50 million in state funding for women’s health services, a response to federal efforts to strip dollars from Planned Parenthood,” reported the Los Angeles Times.

The Sacramento Bee, underneath a section with the subhead “How is [Gov. Jerry] Brown responding to Donald Trump’s Washington?” noted that “The budget provides $6.5 million to fund 31 positions in the state Department of Justice to address what officials describe as new workloads relating to health care, environmental rules, consumer affairs and other general constitutional issues.”

In other words, the Trump administration will be facing plenty of lawsuits from the well-funded California attorney general’s office.

There were even perks for illegal immigrants in the Golden State’s budget: “The $125 billion budget bill California lawmakers passed … gives a state-funded program an extra $15 million to help those facing deportation amid widespread fears of heightened immigration enforcement under the Trump administration,” reported the San Jose Mercury News.

Here’s what is ironic: Our federal tax code is helping enable California’s reckless spending.

Yes, California has high state income taxes. For instance, the rate for millionaires is 13.3 percent. It’s not insanely lower for the middle class, either: A married couple making $103,000 or more would pay a 9.3 percent rate, and while $103,000 might go far in plenty of areas in the United States, California’s outrageously high housing prices ensure that such a couple wouldn’t have an easy time paying all the bills.

But those Hollywood liberals raking in the big bucks and paying the 13.3 percent rate? Well, they’re not actually paying the 13.3 percent rate, thanks to our current U.S. tax code, which allows deduction for state and local taxes.

Let me explain. Currently, if anyone files taxes with itemized deductions, he can deduct his state and local taxes. In other words, if Joe Random makes $250,000 a year, and pays $26,000 in state and local taxes, and then donates an additional $14,000 to charity annually, he could deduct $40,000 from his salary—and pay federal taxes on only $210,000.

This deduction has big benefits for wealthy Californians. According to The Heritage Foundation’s research, that deduction means the effective tax rate for rich lefties in the Golden State is 8 percent, not 13.3 percent.

Yet it’s Washington, not Sacramento, that loses those tax dollars. Essentially, California can pocket the revenues, do all kinds of pie-in-the-sky liberal programs with it … and yet still attract residents by having an effective tax rate significantly more competitive than the state’s actual tax rate.

No wonder one of California’s Democrat senators is speaking out against the new GOP tax reform framework, which would eliminate this deduction. “I don’t believe California should suffer in order for President Trump to give tax cuts to the rich,” said Sen. Dianne Feinstein in a statement.

But the reality is it’s primarily the well-to-do, not the poor, who are going to be affected by the elimination of this deduction. According to forthcoming research by The Heritage Foundation:

More than 70 percent of all taxpayers receive no benefit from the state and local tax deduction. Those who receive no benefit tend to have lower incomes: Only 20 percent of taxpayers making less than $50,000 itemize their deductions, compared with 93 percent of taxpayers who have incomes of $200,000 or more.

Furthermore, for individuals pulling in over $200,000 a year, the average benefit of the state and local tax deduction is $6,296, according to Heritage research. For those making in the range of $40,000 to $50,000, that benefit shrinks to $134.

And it’s not just California whose blue-state government is currently raking in the perks thanks to the tax code.

“Just seven states receive 53 percent of the value of the state and local tax deduction: California, New York, New Jersey, Illinois, Massachusetts, Maryland, and Connecticut,” write Rachel Greszler, Kevin D. Dayaratna, and Michael Sargent in their upcoming report for The Heritage Foundation.

Why should Americans from red states and lower-tax blue states be subsidizing other states? If states like California want to embrace big government, that’s fine—but they should also have to finance it themselves, not ask for a handout from the rest of the country.

Yet unfortunately, there already are suggestions that congressional Republicans might be willing to rethink eliminating the deduction. White House chief economic adviser Gary Cohn told Bloomberg TV last week that elimination of the state and local taxes deduction was “not a red line.”

In 1985, President Ronald Reagan observed, “I don’t believe that we can justify a system that forces taxpayers in low-tax states to subsidize the big-spending policies of a few high-tax states. That really is taxation without representation.”

Reagan didn’t succeed in axing the deduction. But 32 years later, especially as states like Reagan’s California careen further and further into fiscal madness, it’s clear Washington must stop enabling blue states with this extra subsidy.