Fix ldap lookups for zero-length attribute value. Bug 2251