tree: Don't abort early if malloc fails in DOM functions If malloc fails halfway through updating a subtree, we must process the rest of the tree to avoid tree corruption.