Fix #897: Deserialization from 050 to 053 crashes optimizer.
Merge pull request #900 from sjrd/fix-deserialize-hack-050-to-053

Fix #897: Deserialization from 050 to 053 crashes optimizer.