Move the log message in case no results were returned into the right block

… without this, the message `LDAP search returned no results for filter {0}` will be logged even when the search returned results.

Now only log it, in case there are actually no results by moving it from `try` into `except`.