years of United States shareholders in which or with which such taxable years of foreign corporations end. 14302. Separate foreign tax credit limitation basket for foreign branch income (a) In general Section 904(d)(1), as amended by section 14201, is amended by redesignating subparagraphs (B) and (C) as subparagraphs (C) and (D), respectively, and by inserting after subparagraph (A) the following new subparagraph: (B) foreign branch income, . (b) Foreign branch income (1) In general Section 904(d)(2) is amended by inserting after subparagraph (I) the following new subparagraph: (J) Foreign branch income (i) In general The term foreign branch income means the business profits of such United States person which are attributable to 1 or more qualified business units (as defined in section 989(a)) in 1 or more foreign countries. For purposes of the preceding sentence, the amount of business profits attributable to a qualified business unit shall be determined under rules established by the Secretary. (ii) Exception Such term shall not include any income which is passive category income. . (2) Conforming amendment Section 904(d)(2)(A)(ii), as amended by section 14201, is amended by striking income described in paragraph (1)(A) and and inserting income described in paragraph (1)(A), foreign branch income, and . (c) Effective date The amendments made by this section shall apply to taxable years beginning after December 31, 2017. 14303. Acceleration of election to allocate interest, etc., on a worldwide basis (a) In general Section 864(f)(6) is amended by striking December 31, 2020 and inserting December 31, 2017 . (b) Effective date The amendments made by this section shall apply to taxable years beginning after December 31, 2017. 14304. Source of income from sales of inventory determined solely on basis of production activities (a) In general Section 863(b) is amended by adding at the end the following: Gains, profits, and income from the sale or exchange of inventory property described in paragraph (2) shall be