_nl_find_locale: Improve handling of crafted locale names [BZ #17137]