Typing a message in multiple languages causes a StackOverflowException
Steps to reproduce:
1. Type a few characters in English.
2. Switch your input language to another language (I tried Hebrew) and type a few characters.
3. Switch back to English and try to type something.
Bug is reproduced if a StackOverflowException is thrown and the client crashes.