(B)
Inadvertent terminations
If—
(i)
an entity ceases to be a REMIC,
(ii)
the Secretary determines that such cessation was inadvertent,
(iii)
no later than a reasonable time after the discovery of the event resulting in such cessation, steps are taken so that such entity is once more a REMIC, and
(iv)
such entity, and each person holding an interest in such entity at any time during the period specified pursuant to this subsection, agrees to make such adjustments (consistent with the treatment of such entity as a REMIC or a C corporation) as may be required by the Secretary with respect to such period,
then, notwithstanding such terminating event, such entity shall be treated as continuing to be a REMIC (or such cessation shall be disregarded for purposes of subparagraph (A)) whichever the Secretary determines to be appropriate.