Issue #116: Fixed Race condition in locale()