docs: public static SymbolTable copyLocalSymbolTable(SymbolTable symtab)
          throws SubstituteSymbolTableException
      {
          if (! symtab.isLocalTable())
          {
              String message = "symtab should be a local symtab";
              throw new IllegalArgumentException(message);
          }
  
          SymbolTable[] imports =
              ((LocalSymbolTable) symtab).getImportedTablesNoCopy();
  
          // Iterate over each import, we assume that the list of imports
          // rarely exceeds 5.
          for (int i = 0; i < imports.length; i++)
          {
              if (imports[i].isSubstitute())
              {
                  String message =
                      "local symtabs with substituted symtabs for imports " +
                      "(indicating no exact match within the catalog) cannot " +
                      "be copied";
                  throw new SubstituteSymbolTableException(message);
              }
          }
  
          return ((LocalSymbolTable) symtab).makeCopy();
      }