fix duplocale clobbering of new locale struct with memcpy of old