Alexandre Julliard (@julliard) commented about dlls/ntdll/unix/env.c:
if ((header = read_nls_file( "locale.nls" ))) { locale_table = (const NLS_LOCALE_HEADER *)((char *)header + header->locales);
if ((locale = get_win_locale( locale_table, system_locale )))
if ((locale = get_win_locale( locale_table, system_locale )) && locale->idefaultlanguage != LOCALE_CUSTOM_UNSPECIFIED) system_lcid = locale->idefaultlanguage;
if ((locale = get_win_locale( locale_table, user_locale )))
if ((locale = get_win_locale( locale_table, user_locale )) && locale->idefaultlanguage != LOCALE_CUSTOM_UNSPECIFIED)
You shouldn't need to do that for the user locale, named locales should work fine there.