XX-10723 Consistent environment building for LDAP connections.