Marvel Entertainment Group, the company behind the superhero comic books and hit movies, landed in Tax Court this week, and lost a battle against the Internal Revenue Service.

The case, Marvel Entertainment Group v. Commissioner, dates back to financial problems that Marvel had before a string of box office smashes revived its fortunes, not to mention an acquisition by the Walt Disney Company in 2009. But in 1996, some of Marvel’s business units filed for bankruptcy and they excluded the cancellation of indebtedness income from their gross income for a shortened tax year ending Oct. 1, 1998.

Marvel then reduced each of the member entities’ share of consolidated net operating losses according to their previously excluded cancellation of indebtedness income. It then carried forward into a successor affiliated group a consolidated net operating loss of $47,424,026 and used that amount to offset the income of the successor group for taxable years ending Dec. 31, 2003 and 2004.

The IRS disagreed, however, arguing that the tax code requires Marvel’s 1998 tax attribute reduction to occur at the consolidated level rather than the individual entity level. The IRS determined deficiencies of $2,144,756 for tax year 2003 and $14,453,653 for 2004. The Tax Court sided with the IRS.

Hard to believe, but even with the Hulk, Captain America, Thor, Iron Man and Spider-Man in its corner, the Marvel universe can still lose against the IRS. Still, as with most of the Marvel hits, there’s bound to be a sequel.