This happens when a query that is associated with a group is deleted and the group is not correctly updated to be aware of this. Contact support to have the groups updated to no longer point to the deleted query.