For purposes of this chapter, in determining the number of qualifying quarters of coverage under title II of the Social Security Act [
42 U.S.C.
401 et seq.] an alien shall be credited with—
No such qualifying quarter of coverage that is creditable under title II of the Social Security Act for any period beginning after December 31, 1996, may be credited to an alien under paragraph (1) or (2) if the parent or spouse (as the case may be) of such alien received any Federal means-tested public benefit (as provided under section
1613 of this title) during the period for which such qualifying quarter of coverage is so credited. Notwithstanding section
6103 of title
26, the Commissioner of Social Security is authorized to disclose quarters of coverage information concerning an alien and an alien’s spouse or parents to a government agency for the purposes of this chapter.