For purposes of subsection (b) of this section (and for purposes of section
1395p
(g)(1) of this title and section
231f
(d)(2)(ii) of title
45), the 24 months for which an individual has to have been entitled to specified monthly benefits on the basis of disability in order to become entitled to hospital insurance benefits on such basis effective with any particular month (or to be deemed to have enrolled in the supplementary medical insurance program, on the basis of such entitlement, by reason of section
1395p
(f) of this title), where such individual had been entitled to specified monthly benefits of the same type during a previous period which terminated—
shall not include any month which occurred during such previous period, unless the physical or mental impairment which is the basis for disability is the same as (or directly related to) the physical or mental impairment which served as the basis for disability in such previous period.