Fix hyphenated ID decoding, take II

#61, with the simplification suggested by @jrconlin.