Fix bug in transport-IMQS auto detection of key fields.

Bug caused by lack of static typing.
Merge commit '92efe8b'