Fix bug

[ 1180997 ] lax error-checking in new-in-2.4 marshal stuff

which I'd assigned to Martin, but actually turned out to be easy to fix.

Also, a test.
2 files changed