The test marked as expected to fail in /usr/tests/lib/libc/locale/mbrtowctest (https://github.com/freebsd/freebsd/blob/7bddbea75ccbb4c0d4a2ca5b0e8ce713a878b016/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c#L242) seems to be showing a real issue -- when changing ctype component of locale, we can have a state that is perfectly normal for previous locale, and is invalid for new one, leading to unexpected conversion failure. More so, when changing the locale, the meaning of data in opaque structure __mbstate changes. All that lead me to this change resetting the persistent mbstates when new rune locale data is loaded, which required moving the fields from struct _xlocale to its ctype component.