One of the biggest benefits that investors who buy individual stocks have is that they have a lot of control over when they choose to pay tax on their profits. But lately, a recent trend has proven to be an exception to that rule, and some shareholders will get a nasty tax bite when they file their taxes this April.

The latest wrinkle in the tax code comes from what are called corporate inversions. You'll learn more later in this article about these events and how they can cost you at tax time. But first, let's turn to some background on why having to pay taxes prematurely is so unusual at the individual-stock level.

The individual-stock advantage
Anyone who has ever invested in a traditional mutual fund can tell you that one of the most annoying things about mutual funds is how their shareholders have to pay tax on their profits. Because mutual funds are pass-through entities, the funds themselves don't have to pay any income tax when they sell securities or receive dividend or interest income. Instead, they're required to pass on those dividends and capital gains to their shareholders, who are then responsible for their proportional share of the taxes on those profits. That's the logic behind the distributions that mutual funds pay at the end of most years, and even if you reinvest every penny of that distribution, you'll still owe tax as if you had taken the cash instead.

With individual stocks, though, you get to choose when you buy and sell. Although the money that you receive in dividends is subject to tax in the year you receive it, capital gains are all a matter of when you decide to sell. For investors who follow long-term buy-and-hold strategies, holding individual stocks in a taxable account is nearly as valuable a tax shelter as having money in a tax-deferred retirement account -- as long as you hang on to your shares, you won't owe tax on the accumulated gains.

When companies make tax moves
An exception applies to this rule of no capital-gain recognition, and it's becoming more common. As a recent Wall Street Journal article explained in some detail, companies have increasingly moved away from the U.S. to incorporate in other countries. Although the stated motivation in some cases is to align a business more with the scope of the global economy, there are often significant tax benefits as well. For instance, the WSJ article discusses how Eaton (ETN 1.47%) expects to save $160 million in taxes annually because of lower tax rates in Ireland, with the company having taken advantage of Cooper Industries' Irish corporate domicile to make the switch when Eaton bought Cooper. Yet due to the way the transaction was structured, Eaton shareholders had to realize gain when they traded shares of the old Eaton for new Eaton shares.

Moreover, Eaton isn't the only company using similar transactions to gain tax advantages. Insurance company Aon (AON -1.02%) restructured itself in April 2012 to create a new parent holding company in the U.K., raising similar issues as the Eaton transaction. Rowan (RDC) did a similar transaction in May, with the same issues also arising.

In one case, a spinoff created some of the same tax challenges. Sara Lee's breakup into an international coffee company and its Hillshire Brands (HSH.DL) North American meat business raised the issue, as the distribution of the coffee business and eventual merger into the Dutch company D.E Master Blenders 1753raised many of the same legal questions.

Vague regulations
Unfortunately, answering when such transactions led to current capital gains taxation isn't easy. Despite assertions in some cases that the surviving company having "substantial business activities" in the new location would allow shareholders to avoid tax, new temporary regulations make it very difficult for companies to pass the substantial business activity test, and the nature of eventual final regulations is still very much up in the air.

Moreover, not all international transactions are affected by this obscure tax rule. When Pentair (PNR -0.15%) combined with the flow control business of Tyco International, it used a structure similar to the ones described above, with Pentair creating a Swiss subsidiary. Yet because Pentair was smaller than the Tyco division, it wasn't subject to the adverse rule.

What to do
In cases like these, it's difficult for shareholders to do anything, with votes to approve mergers generally going through without impediment. Moreover, the threat of tax avoidance rules getting more complicated could make life difficult for shareholders in an increasing number of situations going forward. Investors need to stay on their toes and scrutinize proposed transactions closely for negative tax impacts.