expenses (as that term is defined in subsection (d)(2)(E)) of such beneficiary shall be treated as if incurred immediately before the death of such beneficiary. . (d) Effective date The amendments made by this section shall apply to amounts paid after the date of the enactment of this Act, in taxable years ending after such date.