LDAP-263: Minor tweak to sample; use LdapQuery wherever possible.