R20: Enable to call MgBaseShape::setFlag() in any thread.