When a variant nested in a copy of a deleted component was switched, the
overrides made in that component's main were dropped: the lookup of the
matching shape in the original variant main stopped at the deleted
component, so the touched attributes were never copied.
Follow deleted components in find-shape-ref-child-of, like the ref chain
walk that collects the touched flags already does.
Closes#13177
AI-assisted-by: claude-opus-5-5