In the case of a domestic corporation subject to the tax imposed by section
11 or
801, if the value of any security (as defined in section
165
(g)(2))—
is restored in whole or in part during any taxable year by reason of any recovery of money or other property in respect of the property to which such security was related, the value so restored (to the extent that, when added to the value so restored during prior taxable years, it does not exceed the amount of the loss described in paragraph (2)) shall, except as provided in subsection (b), be included in gross income for the taxable year in which such restoration occurs.