Fix bug in LocaleResolverTrait exposed by the tests.