Fixed bug where some panels may not be removed when loading a new
session state.