Fix a bug in the UTF-16 decoding algorithm.

For example, [0xD83D, 0xD83D, 0xDCA9] would have incorrectly decoded to
[U+D83D, U+D83D, U+DCA9] rather than [U+D83D, U+1F4A9].

Thanks @Dylan16807 for the #5 bug report.