Nothing in this section shall be construed to prohibit a State from designating or the Secretary from certifying a facility as a critical access hospital solely because, at the time the facility applies to the State for designation as a critical access hospital, there is in effect an agreement between the facility and the Secretary under section
1395tt of this title under which the facility’s inpatient hospital facilities are used for the provision of extended care services, so long as the total number of beds that may be used at any time for the furnishing of either such services or acute care inpatient services does not exceed 25 beds. For purposes of the previous sentence, any bed of a unit of the facility that is licensed as a distinct-part skilled nursing facility at the time the facility applies to the State for designation as a critical access hospital shall not be counted.