Make sure to remove the correct overlay from _popUpToOverlay

Currently the popup manager leaves an orphaned overlay when a popup is closed and the opened again in the same frame. This change fixes that by maintaining the overlay dictionary when the popup is removed and not at a later time.