used to provide construction financing for any building if— (i) such obligation (when issued) identified the building for which the proceeds of such obligation would be used, and (ii) such obligation is redeemed before such building is placed in service. (8) Reduction in basis In the case of any building for which a credit is allowable under this section and section 42, the basis of the building shall be reduced by the amount of such credit allowed under subsection (a). (j) Application of at-Risk rules For purposes of this section— (1) In general Except as otherwise provided in this subsection, rules similar to the rules of section 49(a)(1) (other than subparagraphs (D)(ii)(II) and (D)(iv)(I) thereof), section 49(a)(2), and section 49(b)(1) shall apply in determining the qualified basis of any building in the same manner as such sections apply in determining the credit base of property. (2) Special rules for determining qualified person For purposes of paragraph (1)— (A) In general If the requirements of subparagraphs (B), (C), and (D) are met with respect to any financing borrowed from a qualified nonprofit organization, the determination of whether such financing is qualified commercial financing with respect to any qualified middle-income building shall be made without regard to whether such organization— (i) is actively and regularly engaged in the business of lending money, or (ii) is a person described in section 49(a)(1)(D)(iv)(II). (B) Financing secured by property The requirements of this subparagraph are met with respect to any financing if such financing is secured by the qualified middle-income building, except that this subparagraph shall not apply in the case of a federally assisted building described in subsection (d)(5)(B) if— (i) a security interest in such building is not permitted by a Federal agency holding or insuring the mortgage secured by such building, and (ii) the proceeds from the financing (if any) are applied to acquire or improve such building. (C) Portion of building attributable