fix [#34105] bake artifacts
different threads could allocate the mask buffer and overwrite the same pointer, regression since 2.65


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54315 954f8c5b-7b00-dc11-b283-0030488c597c