Fix crash

It seems that not all machines (at least Jenkins Windows build agent)
have HKCU\Keyboard Layout\Substitutes in which case hkl suddenly is null.
This change ensures that hkl always has a value.
Fix failing tests

Some tests were failing because of the whitespace cleanup and
newline normalization.

Change-Id: I14fddf27cb81b56835fffedd80cf6a8727f04240
Fix failing test (line ends) for Windows
Merge branch 'FlexBridgeBeta'