this works around issue with the "smart" memory locking fixes #3107 (cherry picked from commit 7cfe57d5)