A hot fix for this issue was released:
Download hotfix : unzip the file and follow above instructions:
- Backup the original binary "dsdb3.dll" located under the default install location c:\Program Files\Commerce Server 11\UPM\
- Replace the dsdb3.dll from above location with the one found from this hotfix package
- Restart IIS
The hotfix was built for Sitecore Commerce 8.2.1(Update-2) with Commerce Server 11.4.148, and you should not install it on other Sitecore versions
Details about this issues was published on KB site: https://kb.sitecore.net/en/Articles/2017/12/18/21/17/006092.aspx