First fix in scan_merge: clone each inner graph independently