NXP-14539: fix setLocale recursion