[[ Bugfix 13725 ]] Various fixes to binaryDecode
Merge pull request #1307 from runrevfraser/bugfix-13725

[[ Bugfix 13725 ]] Various fixes to binaryDecode