options.dup won't work. copied locales option to circumvent the need for generic deep dup.