Guard against nil node replacement results