Fixes a bug where leaving the last group a user is a member of throws an error
and doesn't remove the group in ldap
Merge branch 'bugfix-ldap-leave-group' into develop