This change splits CanProcess into a separate loop from Process so that
Process can perform actions like deletion that cause NbtPathEnumerator
to throw an exception. It also caches targetNode.Root before Process
because Process can cause targetNode to be invalid.