CAS-1424: Fixing another potential LDAP connection leak