The U.S. government has a problem with dead people. For one thing, it pays them way too much money.

In the past few years, Social Security paid $133 million to beneficiaries who were deceased. The federal employee retirement system paid more than $400 million to retirees who had passed away. And an aid program spent $3.9 million in federal money to pay heating and air-conditioning bills for more than 11,000 of the dead.

These mistakes are part of a surprising glitch at the heart of the federal bureaucracy. Because of a jury-rigged and outdated system meant to track deaths, the government has trouble determining exactly which Americans are deceased.