Fixes in HEX parser and associated tests.