error. (D) No effect on determination of gross income, etc Except as otherwise provided in this subsection, this title shall be applied without regard to any substitution under paragraph (1). . (b) Child tax credit Subsection (d) of section 24 of such Code is amended by adding at the end the following new paragraph: (6) Special rule relating to Hurricane Harvey and Hurricane Irma See section 32(n) for determination of earned income with respect to the Hurricane Harvey and Hurricane Irma federally declared disasters. . (c) Treatment of possessions (1) Payments to possessions (A) Mirror code possession The Secretary of the Treasury shall pay to each possession of the United States with a mirror code tax system amounts equal to the loss to that possession by reason of the amendments made by this section. Such amounts shall be determined by the Secretary of the Treasury based on information provided by the government of the respective possession. (B) Other possessions The Secretary of the Treasury shall pay to each possession of the United States which does not have a mirror code tax system amounts estimated by the Secretary of the Treasury as being equal to the aggregate benefits that would have been provided to residents of such possession by reason of the amendments made by this section if a mirror code tax system had been in effect in such possession. The preceding sentence shall not apply with respect to any possession of the United States unless such possession has a plan, which has been approved by the Secretary of the Treasury, under which such possession will promptly distribute such payments to the residents of such possession. (2) Coordination with credit allowed against United States income taxes In the case of any person— (A) to whom a credit is allowed against taxes imposed by a possession of the United States by reason of the amendments made by this section for any taxable year, or (B) who is eligible for a payment under a plan described in paragraph (1)(B) with respect to any taxable year, any credit