Various fixes in contact groups handling with LDAP directories