Fix restoration of PannerShell state from session XML (#4185).