Fix for collapsed groups not working well after sessions are restored.
Refs #2559

Change-Id: I759aceee85502e7adce879e0c3ca1446c8c9cbe2