topwin: don't clear the MODALED flag beyound MODALING

When creating nesting modal windows, exiting the top level modal window will
mark all the remaining window un-modaled. This commit fix the bug and keep
the lower window under modal.