Fixes issues with renaming groups and moving a user from group to the root group.