Also makes sure that the code initializing the struct uses the same
mutex.
There is also a duplicating code in comphelper/source/misc/compbase.cxx;
however, to deduplicate also that, we would need to export the function.
Change-Id: I145ea21d5c20536bab887ad55c69b74e7aeeb239
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181865
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>