; or (ii) if the drug is the subject of a listed patent for which a certification has been submitted under subsection (b)(2)(A)(iv) or (j)(2)(A)(vii)(IV) of section 505, and in the patent infringement litigation resulting from the certification the court determines that the patent is valid and would be infringed, the period during which an application may not be approved under section 505(c)(3) or section 505(j)(5)(B) shall be extended by a period of 6 months after the date the patent expires (including any patent extensions). (2) Relation to pediatric and qualified infectious disease product exclusivity Any extension under paragraph (1) of a period shall be in addition to any extension of the periods under sections 505A and 505E of this Act and section 351(m) of the Public Health Service Act, as applicable, with respect to the drug. (c) Limitations Any extension described in subsection (b)(1) shall not apply if the drug designated under subsection (a)(1) has previously received an extension by operation of subsection (b)(1). (d) Definition In this section, the term rare disease or condition has the meaning given to such term in section 526(a)(2). . (b) Application Section 505G of the Federal Food, Drug, and Cosmetic Act, as added by subsection (a), applies only with respect to a drug for which an application or supplemental application described in subsection (a)(1)(B)(i) of such section 505G is first approved under section 505(c) of such Act ( 21 U.S.C. 355(c) ) or section 351(a) of the Public Health Service Act ( 42 U.S.C. 262(a) ) on or after the date of the enactment of this Act. (c) Conforming amendments (1) Relation to pediatric exclusivity for drugs Section 505A of the Federal Food, Drug, and Cosmetic Act ( 21 U.S.C. 355a ) is amended— (A) in subsection (b), by adding at the end the following: (3) Relation to exclusivity for a drug approved for a new indication for a rare disease or condition Notwithstanding the references in paragraph (1) to the lengths of the exclusivity periods after application of