fix longstanding exit logic bugs in mbsnrtowcs and wcsnrtombs