Issue #2685097 by damiankloip, Wim Leers: Fatal error: Call to a member function normalize() on a non-object in XmlEncoder when encoding into xml and there are embedded objects in the response