Make deserialization of the active pane more tolerant and add assertions to catch invalid states