heh — that’s a recent one. Handles this case:
existing: A, B, C, D
new: A, C, D
We hit C in the loop and notice it’s the next node in the existing list, so removing the current node moves it into place. If the current node is elsewhere (eg: at the end of
new), it’ll get re-added via insertBefore() later.
Removing the line actually works totally fine, it just can cause an unoptimized diff for single child removals, which are quite common.