if a deposit consists in part of a gain not recognized under
section 53306 of this title, any expenditure, obligation, or withdrawal applied against that deposit shall be deemed to be a gain in the proportion that the part of the deposit consisting of a gain bears to the total amount of the deposit.