Apple is well known for its sleek designs, pursuit of efficiency, and adroit use of foreign opportunities—not just in its consumer products, but in its hyper-aggressive pursuit of the lowest possible tax rates. But the company’s experience over the past few years highlights the flaws in Donald Trump’s tax-reform plans.

Right now, US companies face one of the few tax regimes that technically taxes income earned abroad, rather than just domestically. The loophole is that this tax is deferred as long as the income isn’t brought back to the US. By one recent estimate, US multinationals are hoarding more than $2 trillion of such income overseas.

Apple is the biggest of these hoarders: In 2016, its foreign subsidiaries took in $41.1 billion dollars in pre-tax earnings, which the company will keep abroad, saving it $5 billion in US taxes. In total, as of September 2016, it held $216 billion in cash abroad, deferring tax payments to the US government worth some $36 billion.

Yesterday it announced its earnings from the second quarter of the new year, noting that 66% came from overseas. In the last six months, the company deferred $2.8 billion in taxes, on pace to beat last year’s number for the same period. Its cash holdings now total $257 billion, the vast majority held overseas (pdf).

Companies like Apple want a US tax code that is simpler and more competitive with other countries. Otherwise, like Apple, they will keep running foreign earnings (and domestic profits, according to Senate investigators) through corporate tax havens like Ireland, Luxembourg, and the Cayman Islands.

Apple CEO Tim Cook didn’t respond directly to a question about tax reform plans on the earnings call today, but he made a point of noting that his company “could only have been created in America” and promised significant investment in its home country.

Apple vs. Congress

In 2013, facing senators angry about how Apple funneled cash through an effectively stateless company to avoid tax payments, Cook laid out four principles Apple backed for tax reform: That it be revenue-neutral, neither lowering nor raising the total amount of money brought in by corporate taxation; that it eliminate corporate tax expenditures (i.e., subsidies and loopholes); that it lower rates; and that it include a “reasonable” tax on foreign earnings to facilitate the return of capital to the US.

The corporate tax overhaul Republican lawmakers proposed in 2016 largely meets these conditions. It lowers the top rate to 20%, closes loopholes, taxes only US income and, according to one independent analysis, would amount to an $890 billion tax cut for business over a decade. That’s not exactly revenue-neutral, but conservative economists argue that the economic growth such a plan engenders will partly compensate for the loss (by generating extra earnings, and therefore tax revenue).

However, the plan also includes something Apple doesn’t like: a border adjustment tax. This essentially taxes imported goods in an effort to prevent US firms from moving their operations overseas—where they won’t pay US tax and labor costs may be lower—and importing their products to the US. Since Apple manufactures almost all its products abroad, border adjustment would hit it hard.

Apple CFO Luca Maestri has criticized the proposal for exactly that reason. So have other multinational companies, as well as economists who fear that it will drive up the value of an already-strong dollar. Backers of border adjustment say it’s needed to return investment and supply chains to the US. Either way, at this moment, multinationals seem able to create enough opposition to the plan to force a rethink.

The Trump alternative

The Trump White House took advantage of the vacuum left by doubts about the border adjustment plan last week. It threw out a skeletal version of corporate tax reform, akin to Trump’s campaign offering, that would lower rates to 15%, closing some loopholes but not fundamentally changing the tax system; among other things, it will eliminate taxes on foreign income without protecting investment in the US. It too is far from revenue-neutral: It would amount to an estimated $2.6 trillion cut in the first 10 years, more than three times what House Republicans contemplated. Even if you take economic growth into account, it will leave a massive deficit.

And, because the plan isn’t a fundamental fix, it’s not clear it would end the incentive for US companies to keep their earnings abroad. While a 15% rate would be much more competitive with the rest of the world, it still wouldn’t be as low as the rate in Ireland, 12.5%, where Apple currently funnels most of its foreign earnings.

It’s also not clear how Trump will get companies like Apple to repatriate their tax-deferred foreign earnings. His campaign plan included a “repatriation holiday,” a 10-year grace period when foreign earnings are taxed at only 10%. But that’s been tried before, and it did little good for the US economy. An extensive analysis (pdf) of a 2004 corporate tax holiday showed that the money returned to the US was not reinvested or used to hire, but often used instead in stock buybacks. That suggests it would have been smarter simply to end deferral.

“The biggest disappointment is that they seem to be sacrificing tax base reform for a simple rate cut,” conservative senator Mike Lee told the Financial Times (paywall) of Trump’s plan. Lee is just one of a who’s-who of conservative policymakers that have lamented the difficulty of making such an expensive tax cut last beyond a few years. And if the cut isn’t permanent, well, it’s unlikely that Apple will bother with the hassle of bringing its cash back to the US.

Walk the line

Corporate tax reform is a balancing act: Lowering rates matters, in the long term, to attract investment to the US. But it’s also essential to fix how and what the US taxes, to ensure that lowering rates doesn’t diminish overall tax revenue or create incentives for pernicious behavior. Trump’s plan does plenty, even too much, on rates, without promising to change the motivation of a company like Apple to shift its overseas earnings back to the US.

For years, conservatives in the House have tried to walk this line in a series of proposals, with more or less success, while still getting the top rate down. Democrats have criticized their work as too generous to corporations at a time of high private profits and high public debt. But Kevin Brady, the Republican legislator who led the party’s tax-writing effort, deserves credit for a proposal that changes the status quo enough to annoy multinational companies, which are still the biggest winners in the current system.

Trump’s plan abandons all those concerns—one reason that House speaker Paul Ryan’s tax adviser derisively termed it a “magical unicorn.” If passed in its current form, it would be an astonishing hand-out to corporations, without attempting to tackle the broader issues of public interest—generating investment in the US, and filling public coffers. Apple would like it, but it wouldn’t be good for the country.