Fix an issue with windows that are unmapped and then reused.