He’s been making records for over 60 years and has cross-generational appeal like no other musician in history. But second to music, Willie Nelson is infamous for both his recreational use of marijuana and his tax troubles with the IRS. So what exactly happened to earn him that reputation?

In 1984, Nelson first came under investigation as the result of his investment in a tax shelter, which was recommended to him by a very large accounting firm. The result of that investigation was a tax bill for close to $17 million, but his lawyers negotiated it down to $6 million (the difference was primarily interest and penalties).

Unfortunately, Nelson didn’t have $6 million either. So in 1990, federal agents raided his home and took virtually everything he owned (except his guitar, Trigger), but it still wasn’t enough to cover his tax liability. So the IRS struck an unprecedented deal with the musician for his release of a compilation album with a profit-sharing agreement between Nelson and the US Treasury.

The album, entitled “The IRS Tapes: Who’ll Buy My Memories?”, was not quite as successful as everyone had hoped. But between those record sales and settlement money from his lawsuit against the accounting firm that originally recommended the tax shelter, Nelson finally cleared his debt with the IRS.

It’s not so much what he did but what Congress didn’t do. The estate tax went away in 2010, even though Congress brought it back to life in 2011 and never meant for it to lapse in the first place. I know that estate taxes are a hot button issue, but politics aside, there is something to be said for consistency because it’s hard to make rational decisions when the rules to the game keep changing.

But sometimes those changes end up working out in your favor—such is the case with George Steinbrenner, who was the owner of the New York Yankees and worth an estimated $1.1 billion when he died July 13, 2010. So based on estate tax rates that took effect January 1, 2011, his family saved around $600 million in taxes. In other words, he picked a good year to die.

In financial history, he’s known as the “Junk Bond King.” He revolutionized the market for high-yield bonds during the 1980s, but he later ended up serving two years in prison and paying $600 million in fines after he was indicted for racketeering and securities fraud. He got greedy, broke the rules, and paid for it. Sorta.

But he is still a very wealthy man, and apparently, he is a generous philanthropist. Although, a recent investigation by the Wall Street Journal raises questions about the opportunistic timing of his philanthropic gifts, so you have to wonder—is he getting greedy and breaking the rules again?

Donating stock to a charitable organization is a great move if you have appreciated securities and a cause that you want to support. There is no tax on the gain, and you receive a deduction equal to the fair market value of the stock on the date of the gift. So what tax game could you possibly play? Well, if you just happen to give away the stock before a dramatic fall in value, you come out way ahead.

That’s exactly what Milken did in 2013 when he donated $27 million of K12 Inc. stock to charity, which then lost 38% of its value less than a month later. Coincidence? Sure, maybe. But he did the same thing back in 2003 when he donated $17 million of another company, which lost 25% of its value a little over a month later.

But Milken is not alone. In fact, the Wall Street Journal recently investigated 14,000 donations to private foundations (public charities do not have to identify their donors) and found that stock donations before a loss of 25% or more are three times as likely as donations before a gain of the same amount. Statistically, it is very doubtful that those results are random.

At the end of the day, it’s still a charitable contribution. But you have to wonder if he’s reverted to his old ways of breaking rules to come out ahead.

He’s not famous, and he’s not wealthy. But Jesse Linde is a retired Army helicopter pilot who, after struggling to find work in the US where competition among younger pilots is fierce, landed a job with a government contractor in Iraq.

While in country, Linde lived among the general population: eating at local restaurants, befriending native interpreters, and spending his free time outside secure areas. And since he made Iraq his home, he used the foreign earned income exclusion under Section 911, excluding his income from federal taxation.

But since Linde had an unusual work schedule—he worked 60 days straight followed by 30 days off—Linde also made it back to the US on a frequent basis. As a result, the IRS issued an assessment for each year he used the foreign income exclusion, rejecting his qualifications for the credit.

Taxpayers typically use the physical presence test because it provides a bright line safe harbor for those who work abroad for most of the year. But there is an alternative qualification if you can establish that you are a bona fide resident of a foreign country, and that’s exactly what Linde did.

Ultimately, the Tax Court decided that even though Linde returned to the US frequently and did not meet the physical presence test, he made Iraq his tax home. As a result, he owed no income taxes for the years in question.

For the taxable years 2009 and 2010, the IRS sent Boston Bruins owner Jeremy Jacobs tax deficiency notices of $45,205 and $39,823, respectively. Now, that’s a pretty big bill for an everyday taxpayer, but for a man with an estimated net worth of over $4 billion, it’s not a huge deal. Although, that doesn’t mean he won’t fight it.

So what triggered the deficiency notices? The IRS claimed that the Bruins were only eligible to deduct 50% of meals provided players during out-of-town games. Back in the good ole days of the 1980s, business owners frequently ran up large tabs for boozy business lunches at expensive restaurants because it was 100% deductible.

Then, along the way Congress enacted Section 274(n) of the code, which generally limits meal deductions to 50%. However, there is a de minimis exception in Section 119(a). Of course, like all exceptions, there are certain requirements, one of which is that the meals must be provided on the “business premises,” which is the crux of this case.

The IRS argued that during these out of town games, meals were not served on Bruins property and the exception shouldn’t count. However, the Bruins claimed that these meals served in rooms leased by the business were a vital part of the franchise’s success and should qualify for the exception.

On June 26, 2017, the Tax Court ruled in favor of the Bruins owner and opened up the potential for greater latitude with the business meals deductions in the future.