private static boolean containsErrorElement(@NotNull Block block) {
    if (block instanceof ASTBlock) {
      ASTNode node = ((ASTBlock)block).getNode();
      if (node != null) {
        return TemplateFormatUtil.isErrorElement(node.getPsi());
      }
    }
    return false;
  }
private static boolean containsErrorElement(@NotNull Block block)