fixes #4643 - Retrieving Optional LDAP attributes fails on 1.8.7