Ensure in groupsMode before attempting to clear it.