If I remember correctly, that type of scenario unfolded in mortgage banking back in the 1980s. Congress helped the S&L industry through its crisis by instituting a tax break that allowed banks and savings/loan institutions to write off losses against profits they had previously reported on tax returns dating back many years.
They did.