Top-bracket taxpayers in New York, New Jersey and Connecticut face some hard choices in the coming year. Choose right, and they reap a substantial tax windfall. Choose wrong, and they get to spend years in tax court before finally writing healthy checks to the IRS.

Don’t know what I’m talking about? Let me explain. The tax reform law passed late last year limits the individuals’ ability to deduct their state and local taxes against their federal tax liability. Legislators in states with lots of high-income residents who itemize their deductions, and lots of state and local taxes for them to itemize, are understandably frantic to find some way to get around this limitation.

For people in the very tippy-top brackets, this effectively amounts to an increase in their state and local tax payments of almost one-third. And those folks generate a lot of money for wealthy blue states. How much? Here’s an illustrative example: The announcement that a single hedge-fund billionaire was moving to Florida created a mini-budget crisis for the state of New Jersey.

While those same people are also getting a cut in their federal taxes courtesy of the tax law, that’s not necessarily going to make them any happier about what they’re paying closer to home, especially since at least some of them are going to end up paying higher taxes on net. If they start eyeing greener pastures — or lobbying harder for their states to rein in spending — then those legislators are going to have a major headache.

Hence the creative proposals to restore federal deductions without cutting into state and local revenue. The most popular, currently, is allowing taxpayers to make a “charitable donation” to charities approved by a lower-level government (which often look a lot like … that government) and receive, in return, a credit against the taxes they owe to that government. Since charitable donations are still deductible against your federal taxes, this keeps everyone happy.

Everyone except, maybe, the IRS, which just announced its intent to write regulations on this sort of workaround. Such notices are always written in High Church Bureaucratic, and this notice is no exception. But here’s the key section:

The proposed regulations will make clear that the requirements of the Internal Revenue Code, informed by substance-over-form principles, govern the federal income tax treatment of such transfers. The proposed regulations will assist taxpayers in understanding the relationship between the federal charitable contribution deduction and the new statutory limitation on the deduction for state and local tax payments.

Let me provide a translation for those who aren’t fluent in Tax. When the IRS promulgates rules about this sort of scheme, it’s going to lean heavily on the venerable Substance-Over-Form Doctrine, the IRS’s famed “one-sided sword” for disallowing new deductions. In the vernacular, if it looks like a duck and quacks like a duck, then the IRS is generally going to call it a duck. No matter how hard you insist that it is your beloved, and medically deductible, seeing-eye dog.

What this means for high-income residents of high-tax states is that you can call it a charitable contribution all you want, if doing so brings you joy. But the IRS is still probably going to call it “paying your state and local taxes” and then call on you to cough up more cash.

The IRS does not, of course, have the final word in this matter. We can be sure that this one is going to court and probably a few rounds of appeals. But that leaves taxpayers in a quandary because they cannot wait for the appellate court to rule on how much federal tax they owe. They need to decide whether to try this strategy by April 15 of next year.

Which could be a very expensive decision. New York, for example, isn’t offering a dollar-for-dollar tax credit for charitable donations; the credit offers you 85 percent of your “donation” against state taxes and 95 percent against local taxes. So if you attempt to use this strategy in 2018, and then the courts rule that this is just plain old paying your taxes, you’re doubly out of luck. You paid more than you would have if you’d just paid your tax bill, and you still owe Uncle Sam.

But that’s not the only potential expense. There’s also the expense of arguing with the IRS about how much tax you owe.

As an army of tax attorneys helpfully explained to me on Twitter last night, taxpayers who want to fight when the IRS disallows a deduction have two options. They can pay what the IRS says they owe and then demand a refund in district court. Or they can insist on paying only what they think the IRS is entitled to, and then go to tax court. Tax courts, as you might imagine, see a lot of weaselly people who are trying to cheat the IRS. They also have to handle crazy people who think the federal income tax is unconstitutional, even though we made a whole amendment about it and everything. They are jaded people, those who work in tax court. They level the gimlet eye on anyone who thinks they’ve found a new way to avoid taxes.

So if you want to fight this battle with the IRS personally, you can choose to spend a lot of money and go to district court, or somewhat less money and take your chances with a world-weary tax court judge. Just hope that the tax judge has eaten a particularly splendid breakfast and will be in a generous mood.

Either way, you’re going to spend even more money on a tax lawyer while you wait for a definitive ruling. Maybe, in time, you get most of that money back. Or maybe the appellate judges are just as skeptical as the IRS, and you’ve just spent a lot of money for no benefit. Wise taxpayers may well just decide to wait to attempt this particular bit of tax-jiu-jitsu until someone else has taken a test case through the courts.

Eventually the appeals will end, and we’ll have an answer, one way or another. But in the meantime, expect to hear a lot of pained groans from better-heeled precincts of the northeast.