The reason the total federal debt increased in a surplus year is due to the mathematical chimera of government accounting! :)
The U.S. government decided that it should include in its receipts figures a portion of the receipts from payroll taxes (specifically, from Social Security taxes). The government takes these receipts and uses them to fund government operations.
"Blasphemy" you decry? "Wasn't that money specifically taxed for the purpose of placing in the Social Security Trust Fund for the retirments of the baby boomers?" Yes, it was. The government currently takes in around $200 billion more a year in FICA taxes than it spends on social security. The whole point of this was to build a reserve fund for when the 60+ million baby boomers, who haven't saved nearly enough, began to retire.
So how does the government account for this shady practice? Instead of placing actual money in the coffers of the Social Security Trust Fund it places federal IOUs, thats right... federal debt instruments. In reality, any budget surplus/deficit figure the government releases should be adjusted downward by around $200 billion. If the government says the budget surplus is $20 billion, its really a $180 billion deficit.
Another nice twist, if a U.S. corporation took the overfunding amounts of its pension plans and include those amounts in revenue, thereby boosting its reported results, the SEC would be all over them. Ah, the priviledge of being a sovereign government.