Collapse a panel when all contained sections are inactivated