Fix crash on group collapse.