Exception related to personal casualty gains
If a taxpayer has personal casualty gains for any taxable year to which subparagraph (A) applies—
(i)#
subparagraph (A) shall not apply to the portion of the personal casualty loss not attributable to a Federally declared disaster (as so defined) or a State declared disaster to the extent such loss does not exceed such gains, and
(ii)#
in applying paragraph (2) for purposes of subparagraph (A) to the portion of personal casualty loss which is so attributable to such a disaster, the amount of personal casualty gains taken into account under paragraph (2)(A) shall be reduced by the portion of such gains taken into account under clause (i).