Return only valid dn (Trac 11373)

- Memberuids differed by really existing users
correct sorting of inherited classes (Trac #11485)
Warning when more than one repository (Trac #9361)
Merge remote-tracking branch 'lhm/2.7-lhm' into 2.7-lhm