Only individuals and pass-through entities (S corporations, partnerships and limited liability companies) benefit from capital gain, there must be a transfer of all rights.
In that case, the bank would not record all of the capital gain for the sale of the junk bonds, as some would now appear as an internal transfer of assets.