List<Block> (List<Block> originalBlocks) { if (myNode.getPsi() instanceof PsiFile) { List<Block> patchedBlocks = new ArrayList<>(); for (Block block : originalBlocks) { if (block == originalBlocks.get(0) && block instanceof TemplateXmlBlock) { patchedBlocks.addAll(((TemplateXmlBlock)block).buildChildrenNoMerge()); } else { patchedBlocks.add(block); } } return patchedBlocks; } else { return originalBlocks; } }