Merge "Add thread safety check to libgui build"