replaceReferredObject's params changed from IDs to HeapObjects.