If paragraph (2) or (4) of section
152
(e) applies to any child with respect to any calendar year, in the case of any taxable year beginning in such calendar year, such child shall be treated as described in paragraph (1)(B) with respect to the custodial parent (within the meaning of section
152
(e)(1)) and not with respect to the noncustodial parent.