[bugfix] Restoring backup using an LDAP realm was broken.

User lookup on LDAP caused an endless loop during restore. Checking for existing users thus has to be done in two steps.