Changes in 4e75f84ac9a0ad451d096d8c9cad58fd3b5574dd to allow ignoring
non-hexa characters (such as whitespace) have also allowed dangling
hex digits, which were then padded with an implicit 0. This restores
the original behaviour of throwing an exception for these inputs.