This prevents void-variable +popup-buffer-mode-map errors that occur in some hard to reproduce scenarios. Also ensures that window-persistent-parameters is being restored when +popup-mode is disabled.