Though lots of people grumble about the government bailing out banks in the financial crisis, we have at least taken some comfort in the idea that the government has turned a profit on that bailout.

Only problem is, that profit comes from taxpayer money -- money that was meant to spur banks to develop communities and help small businesses. Instead they've used it to develop and help themselves.

All told, including dividend, interest and other payments, U.S. banks have repaid the government $211.5 billion under the Capital Purchase Program (CPP), the first phase of the government's Troubled Asset Relief Program (TARP), according to a report Thursday by the Government Accountability Office, a congressional watchdog. That's more than the $204.9 billion the banks initially got under TARP.

$211.5 billion minus $204.9 billion equals profit, right?

But 48 percent of the banks that have repaid the CPP used money they'd gotten from other federal programs, according to the GAO report. Those programs include the Community Development Capital Initiative -- another TARP program -- and the Small Business Lending Fund, a program designed to encourage lending to small businesses. Both of those programs have more favorable borrowing terms for the banks than the original CPP.

This isn't a new issue -- The Wall Street Journal reported last October that banks were repaying TARP funds with cash earmarked for small-business loans, after the Independent Community Bankers of America lobbied for the ability to switch money "from one Treasury program to the other."

Small businesses have continued to struggle to get credit, a drag on the recovery, while banks have been using funds earmarked for lending to small businesses simply to pay back their first TARP bailout.

At Yahoo Finance, Dan Gross sees a silver lining in the fact that these banks have at least swapped out of one government program that simply hands them cash for ones that encourage them to do something constructive with that cash.

Still, the fact that some banks refinanced their initial TARP investments by borrowing from other federal government programs undercuts the Treasury Department's claim that the government has made money from TARP, wrote Matt Stoller, a fellow at the Roosevelt Institute and a former senior policy advisor to former Democratic Florida Rep. Alan Grayson, in a post at the Naked Capitalism blog:

Our banking system is still reliant on the government for support. Officials can claim that TARP made money, but it’s becoming increasingly clear that this is a way of avoiding a description of the actual policy framework.

Meanwhile, there is still about $16.7 billion in original CPP money that hasn't been paid back, the GAO report says. (The government has turned a slight profit on CPP so far because the dividend and interest payments from other banks have amounted to more than that $16.7 billion). And while the biggest banks have paid their money back, several smaller banks are having trouble making regularly scheduled payments to the government, the GAO report says.

The Wall Street Journal's Real Time Economics blog wrote:

As of Nov. 30, 158 had missed quarterly payments, a marked increase from eight in February 2009, GAO said. And the number of problem banks–those that demonstrated financial, operational or managerial weaknesses that threatened their continued financial viability–rose to 130 in December 2011 from 47 in December 2009 GAO said.

It may be unfair to quibble with the Treasury Department's claim that the government is making money on TARP. After all, the bailout was not meant to be a get-rich-quick scheme. It was meant to stop the financial sector from collapsing into a giant black hole that was going to suck the global economy inside of it.

But it is worth remembering that the banking sector is where it is today thanks to the good graces of American taxpayers, who are still on the hook if these banks can't pay back the money they've borrowed to stay afloat. And whether we're talking about small banks or big banks, it's still too early to say the banking sector is in the clear.