Fix handling of multi valued ldap attributes (cherry picked from commit 293021b2000e9d459387153ca5690f97e0184aaa)