Pre-process root.links to copy nodes into source and target, to avoid breakage that was coming from not having int id values.