(g) (whether prospective, present, or former occupants of the building) the right to enforce in any State court the requirement and prohibitions of clause (i), (iii) which prohibits the disposition to any person of any portion of the building to which such agreement applies unless all of the building to which such agreement applies is disposed of to such person, (iv) which prohibits the refusal to lease to a holder of a voucher or certificate of eligibility under section 8 of the United States Housing Act of 1937 because of the status of the prospective tenant as such a holder, (v) which is binding on all successors of the taxpayer, and (vi) which, with respect to the property, is recorded pursuant to State law as a restrictive covenant. (C) Allocation of credit may not exceed amount necessary to support commitment The housing credit dollar amount allocated to any building may not exceed the amount necessary to support the applicable fraction specified in the extended middle-income housing commitment for such building, including any increase in such fraction pursuant to the application of subsection (f)(3) if such increase is reflected in an amended middle-income housing commitment. (D) Extended use period For purposes of this paragraph, the term extended use period means the period— (i) beginning on the 1st day in credit period on which such building is part of a qualified middle-income housing project, and (ii) ending on the later of— (I) the date specified by such agency in such agreement, or (II) the date which is 15 years after the close of the credit period. (E) Exceptions if foreclosure or if no buyer willing to maintain middle-income status (i) In general The extended use period for any building shall terminate— (I) on the date the building is acquired by foreclosure (or instrument in lieu of foreclosure) unless the Secretary determines that such acquisition is part of an arrangement with the taxpayer a purpose of which is to terminate such period, or (II) on the last day of the period specified in