; (B) in subsection (g)(2), in the matter before subparagraph (A), by inserting and subsection (h) after paragraphs (3) and (5) ; and (C) by adding at the end the following new subsection: (h) Sunset of Medicaid funding limitations for Puerto Rico, the Virgin Islands of the United States, Guam, the Northern Mariana Islands, and American Samoa Subsections (f) and (g) shall not apply to Puerto Rico, the Virgin Islands of the United States, Guam, the Northern Mariana Islands, and American Samoa beginning with fiscal year 2019. . (2) Conforming amendments (A) Section 1902(j) of the Social Security Act ( 42 U.S.C. 1396a(j) ) is amended by striking , the limitation in section 1108(f), . (B) Section 1903(u) of the Social Security Act ( 42 U.S.C. 1396b(u) ) is amended by striking paragraph (4). (C) Section 1323(c)(1) of the Patient Protection and Affordable Care Act ( 42 U.S.C. 18043(c)(1) ) is amended by striking 2019 and inserting 2018 . (3) Effective date The amendments made by this section shall apply beginning with fiscal year 2019. (b) Elimination of specific Federal medical assistance percentage (FMAP) limitation for territories Section 1905(b) of the Social Security Act ( 42 U.S.C. 1396d(b) ) is amended, in clause (2), by inserting for fiscal years before fiscal year 2019 after American Samoa . 405. Extension of Medicare secondary payer (a) In general Section 1862(b)(1)(C) of the Social Security Act ( 42 U.S.C. 1395y(b)(1)(C) ) is amended— (1) in the last sentence, by inserting , and before January 1, 2019 after prior to such date)