int condIndex = node.getChildIndex(condNode);
for (int i = node.numChildren() - 1; i > condIndex; i--) {
node.removeChild(i);
}
// Replace this child with a new IfElseNode.
IfElseNode newElseNode = new IfElseNode(nodeIdGen.genId());
newElseNode.addChildren(condNode.getChildren());
node.replaceChild(condIndex, newElseNode);
// Stop processing.
break;
} else {