Add test for decodeIdentHeader

Along with some associated rearranging.