LDAP: even better check for emptiness, fixes #3815