Cherry-pick auto-discover multi-graph root fix.