LDAP: fix background job, resolves #3528