The call to `startVisitingObject` should be moved out of the if statement (namespaces can be defined in child nodes too), as explained in:
https://github.com/schmittjoh/serializer/pull/58/files#L11R233