If it were a movie, it would be called “Revenge of the Tax Code.” The complex income tax, which has bedeviled average Americans for years, is biting back at the elite who helped create it. Tom Daschle, former chief lawmaker in the Senate, withdrew his Cabinet nomination because of an “unintentional” $128,000 tax mistake. Rep. Charles Rangel, chief tax-writer in the House, is also entangled in a tax scandal, as is Tim Geithner, the Treasury secretary, and Nancy Killefer, another high-ranking nominee who has withdrawn.

What is going on here?

Whether you believe the excuses of these folks or not, it’s common for both taxpayers and the Internal Revenue Service to make big errors. “The question of what constitutes gross income remains a source of confusion for many taxpayers,” according to the Taxpayer Advocate Service of the IRS. Daschle’s mistake was to ignore the fact that all “accessions to wealth,” or unearned income, including the benefits from his chauffeur, are taxable unless the code explicitly excludes them.

Rangel claimed that his error was due in part to “cultural and language barriers” and also stemmed from his failure to note that all foreign income needs to be reported, including the $75,000 he earned by renting his Dominican Republic beach house. It may be a bit hard to believe the 19-term congressman from New York when he claims, as he did last year, that “I never had any idea that I got any income.” But the global sweep of the income tax does seem to surprise people. If you have a savings account in Mexico, that’s taxed. If you move to London to work, you are taxed. Even if you scrap your U.S. citizenship and move to a mountaintop in Tibet, the IRS will still chase after you.

The IRS enforces a worldwide web of tax requirements, but it is a web full of holes. The Daschle, Rangel, Geithner and Killefer errors are part of the roughly $350 billion “tax gap” of unpaid taxes each year. The root of the problem is the intense complexity of the income tax. The labyrinthine code trips up many people who make honest errors, but it also makes it more difficult for the IRS to find cheats.

The Taxpayer Advocate Service has noted the “perversity” of tax complexity: “Taxpayers who honestly seek to comply with the law often make inadvertent errors causing them … to become subject to IRS enforcement.… On the other hand, sophisticated taxpayers often find loopholes that enable them to reduce or eliminate their tax liabilities.”

The income tax is a breeding ground for such loopholes because of its hugely inconsistent treatment of “income.” A large amount of income is not taxed at all, while other income is taxed multiple times. In 2006, taxable income in the United States was just half of what the Department of Commerce reports as total personal income. While municipal bond interest goes untaxed, for example, corporate equity is taxed twice — at the business level and at the individual level.

These sorts of inconsistencies foster aggressive tax planning by individuals and corporations. Enron, for example, capitalized on the different ways business income is treated, setting up partnerships, real estate investment trusts and other structures, and exploited the tax differences between them.

The solution to all these problems — from the Enron debacle to Obama’s tax-troubled nominees — is to reform the tax code. With a simple and consistent base, taxpayers would know what they owe, and the IRS could easily enforce it. That is the promise of the “flat tax,” which would tax all income once and create a level playing field with no tax-free loopholes. The notion of a flat tax debuted three decades ago and was initially championed by Democrats such as Obama’s pick for CIA director, former congressman Leon Panetta. The flat tax later became a Republican cause, but there is no reason why Democrats couldn’t rediscover their tax-reform roots. In fact, this nomination season would appear to give them ample reason to do so.

A flat tax would divide all income into two pots: labor income and capital income. The labor income would be taxed to individuals on a postcard-size return that even Rangel and Daschle would have a hard time evading. The capital income — profits, interest and rents — would be taxed at the business level under a consistent structure that would make Enron-style shenanigans impossible.

In the past, flat-tax lovers and haters have clashed over the desirability of a single rate. But it is the simple base of the flat tax that is really revolutionary. The simple base — free of exemptions, deductions and credits — would vanquish the 1040 instruction book, which has swollen from 112 to 161 pages in just the past 10 years and keeps on growing.

It would also vanquish the special-interest tax breaks that Obama railed against in his campaign. And, as an additional benefit, the simplicity of the flat tax would fit perfectly into the president’s theme of government transparency. He might be suspicious of a single-rate tax, but he could propose a multi-rate version of the flat tax and still get the benefits of the simple base.

A recent survey by the IRS Oversight Board showed that 90 percent of Americans say that it is “not at all” acceptable to cheat on your taxes, and it surely irks people when those in high office cheat. The only way to reconcile the public’s anger at tax cheating and its civil libertarian fear of the IRS is to reform the tax code. That would make it easier for the IRS to catch the tax cheats while freeing the rest of us from onerous paperwork and the risk of botched Cabinet appointments or, at the very least, costly tax mistakes.