Coordination with section 877
If—
(A) an alien individual was treated as a resident of the United States during any period which includes at least 3 consecutive calendar years (hereinafter referred to as the “initial residency period”), and
(B) such individual ceases to be treated as a resident of the United States but subsequently becomes a resident of the United States before the close of the 3rd calendar year beginning after the close of the initial residency period,
such individual shall be taxable for the period after the close of the initial residency period and before the day on which he subsequently became a resident of the United States in the manner provided in section 877(b). The preceding sentence shall apply only if the tax imposed pursuant to section 877(b) exceeds the tax which, without regard to this paragraph, is imposed pursuant to section 871.