Fixes to (de)serialization of objects which are sub-types of given property type.