Use callback during resolution of cross document references.
Fix setting of object type.