Fix in scan_merge: clone each inner graph independently