*************** *** 342,348 **** } if (firstRealGrandchild && firstRealGrandchild.nodeName.toLowerCase() == 'block') { - blockChild = Blockly.Xml.domToBlock(workspace, firstRealGrandchild, opt_reuseBlock); if (blockChild.outputConnection) { input.connection.connect(blockChild.outputConnection); --- 415,421 ---- } if (firstRealGrandchild && firstRealGrandchild.nodeName.toLowerCase() == 'block') { + blockChild = Blockly.Xml.domToBlockInner(workspace, firstRealGrandchild, opt_reuseBlock); if (blockChild.outputConnection) { input.connection.connect(blockChild.outputConnection); *************** *** 362,368 **** // This could happen if there is more than one XML 'next' tag. throw 'Next statement is already connected.'; } - blockChild = Blockly.Xml.domToBlock(workspace, firstRealGrandchild, opt_reuseBlock); if (!blockChild.previousConnection) { throw 'Next block does not have previous statement.'; --- 435,441 ---- // This could happen if there is more than one XML 'next' tag. throw 'Next statement is already connected.'; } + blockChild = Blockly.Xml.domToBlockInner(workspace, firstRealGrandchild, opt_reuseBlock); if (!blockChild.previousConnection) { throw 'Next block does not have previous statement.';