whether or not such taxpayer ceases to be an applicable taxpayer) until the SLDO account is resolved and all liabilities with respect to such SLDO account have been paid. For purposes of this subsection, an SLDO account shall be treated as resolved upon the death of the taxpayer, the distribution of all assets of the SLDO account, a determination by the Secretary that further treatment as a SLDO account is inconsistent with the purposes of this section, or a determination by the Secretary described in subparagraph (J). (J) If the Secretary determines, upon application by the taxpayer, that the resolution of a SLDO account is not inconsistent with the purposes of this section— (i) all remaining assets of such SLDO account shall be treated as distributed, and (ii) such SLDO account shall be treated as resolved. (K) Upon the resolution of the SLDO account, there shall be imposed on the taxpayer a tax (or a refund of taxes previously paid may be awarded) as determined by the Secretary by applying a retrospective formula determined by the Secretary to eliminate the entire tax advantage of deferral. Such tax shall be determined in a manner to take into account prior distributions from the SLDO account and any tax previously imposed thereon and any liability under this subsection which is paid in advance under subparagraph (G). (L) If, upon the death of a taxpayer, an heir of SLDO assets elects to initiate a carry-over SLDO account for such inherited assets— (i) such assets shall not be taken into account under subparagraph (J) upon the resolution of the decedent’s SLDO account, (ii) such heir’s carry-over SLDO account shall begin with a notional interest percentage equal to that of the decedent’s SLDO account at the time of death, and (iii) such carry-over SLDO account shall be maintained separately from any SLDO account otherwise maintained by such heir. (g) Treatment of trusts and estates as applicable taxpayers For purposes of this chapter— (1) In general Any trust (other than a trust the assets of which are