It will be tricky to add the namespaces in the ``prepare``. However, I think it should also work if we add them when we start visiting an object, i.e. ``startVisitingObject``, no?