LDAP: improve compilation of filters