Fix #811: Remove deserialization hacks.
Merge pull request #1077 from sjrd/remove-deser-hacks

Fix #811: Remove deserialization hacks.