Fix for mutex operation visibility, fixes #375