Fixes #3621 : when deleting a group, remove it from the rule as well