Replacing a element, and deleting the next child as part of that replacement, stops the replacement from being processed
(View the original source to see exactly what the test is doing).