Having a first modal window, if you open from there a new one (modal too), and apply to it a call to the destroy function when it closes, makes the first window to lose modal.
Sample: http://jsbin.com/ixojov/1/edit
Sample: http://jsbin.com/ixojov/1/edit