Fix replacement variables in user-specific base_dn in some LDAP requests (#1489279)