Fix another crash (LT-15180)

We now check the flags before trying to activate an IM. This should
prevent similar crashes. The main reason however was that we failed to
clone all fields of the WinKeyboardDescription. Added unit test that
checks for that in the future.

Change-Id: I72259052d2bb0505122cf75bd59a30d3341db332