Replace visitor with simply obtaining permanent objectID's for temporary objects inserted into the context

The visitation implementation was problematic with large object graphs. This will obtain permanent objectID's for all temporary objects, but avoids having to visit each node in the graph.