code: private boolean isLoneBlock(Node n) {
      Node parent = n.getParent();
      if (parent != null && (parent.isScript()
          || (parent.isBlock() && !parent.isSyntheticBlock() && !parent.isAddedBlock()))) {
        return !n.isSyntheticBlock() && !n.isAddedBlock();
      }
      return false;
    }
docs: A lone block is a non-synthetic, not-added BLOCK that is a direct child of
  another non-synthetic, not-added BLOCK or a SCRIPT node.