Revert "LDAP: better check for emptiness, fixes #3815"

This reverts commit 4797f9d7db8b48c977e34303a9c80eaea704af19.
LDAP: even better check for emptiness, fixes #3815