Making sure the undostack is cleared of entries to a loadout when the loadout view is closed.