if (templateNodeForCase != null) {
_outputNodes = createOutputNodesForExternalTemplateNode(mappingName, templateNodeForCase, newInputNode, inputChanged);
} else {
_outputNodes = createOutputNodesForTemplateNode(mappingName, templateNode, newInputNode, nodeMacrosToSkip + 1, inputChanged);
}
<BUG>if (_outputNodes != null) outputNodes.addAll(_outputNodes);
if (inputChanged) {
popInputHistory();
} else if (registerTopOutput) {
myGenerator.addTopOutputNodesByInputNode(inputNode, _outputNodes);</BUG>
}

if (templateNodeForCase != null) {
_outputNodes = createOutputNodesForExternalTemplateNode(mappingName, templateNodeForCase, newInputNode, inputChanged);
} else {
_outputNodes = createOutputNodesForTemplateNode(mappingName, templateNode, newInputNode, nodeMacrosToSkip + 1, inputChanged);
