Ned/add test to 4080

@AnuragRamdasan I've written a test for you, and fixed up the decoding, which seems to have been broken with the undefined change.