work around a bug in jms/serializer when nested polymorphic objects are serialized until schmittjoh/serializer#238 gets merged