The amount which would (but for this paragraph) be taken into account under paragraph (1) with respect to any qualified rehabilitated building shall be reduced (but not below zero) by any amount of qualified rehabilitation expenditures taken into account under subsection (d) by the taxpayer or a predecessor of the taxpayer (or, in the case of a sale and leaseback described in section
50
(a)(2)(C), by the lessee), to the extent any amount so taken into account has not been required to be recaptured under section
50
(a).