#JC-1869: Fixed performance issues with locale resolving