diff --git a/crates/torin/src/torin.rs b/crates/torin/src/torin.rs index 24128f5f5..be15576db 100644 --- a/crates/torin/src/torin.rs +++ b/crates/torin/src/torin.rs @@ -201,7 +201,12 @@ impl Torin { DirtyReason::Reorder => true, }; for child_id in parent_children { - self.safe_invalidate(child_id, dom_adapter); + if found_node { + self.safe_invalidate(child_id, dom_adapter); + } + if child_id == node_id { + found_node = true; + } } // Try using the node's parent as root candidate if it has multiple children