+ * TODO: FIX CYCLIC __ensure+instance_ids
+ * Implementation note for the todo:
+ * this works like a depth-first search over all vamsas objects in an vamsasDocument.
+ * The doHash() function is used as the 'visited' flag -
+ * this *is not* a valid heuristic, although it will work "most of the time".