Fixed multiple duplicate locale definition when calling setlocales() several times