; and (ii) in subparagraph (B), by striking The Secretary and inserting The Secretary of the Treasury, in consultation with the Secretary of Health and Human Services and the Secretary of the Department of Homeland Security, . (4) Controlled group and single taxpayer rules Paragraph (5) of section 5051(a) of the Internal Revenue Code of 1986, as amended by section 13802(d) of Public Law 115–97 , is amended by striking paragraph (1)(C)(i) each place it appears and inserting paragraph (1)(A)(i) . (5) Effective date The amendments made by this subsection shall apply to beer removed after December 31, 2017. (c) Transfer of beer between bonded facilities (1) In general Section 5414 of the Internal Revenue Code of 1986, as amended by section 13803(a) of Public Law 115–97 , is amended to read as follows: 5414. Transfer of beer between bonded facilities (a) In general Beer may be removed from one brewery to another brewery, without payment of tax, and may be mingled with beer at the receiving brewery, subject to such conditions, including payment of the tax, and in such containers, as the Secretary by regulations shall prescribe, which shall include— (1) any removal from one brewery to another brewery belonging to the same brewer, (2) any removal from a brewery owned by one corporation to a brewery owned by another corporation when— (A) one such corporation owns the controlling interest in the other such corporation, or (B) the controlling interest in each such corporation is owned by the same person or persons, and (3) any removal from one brewery to another brewery when— (A) the proprietors of transferring and receiving premises are independent of each other and neither has a proprietary interest, directly or indirectly, in the business of the other, and (B) the transferor has divested itself of all interest in the beer so transferred and the transferee has accepted responsibility for payment of the tax. (b) Transfer of liability for tax For purposes of subsection (a)(3), such relief from liability shall be effective