private static String getUniqueNameIgnoringCurrentParameters(SymbolTable symbolTable,
			Function function, String baseName, Set<String> namesNotToBeUsed) {
		String name = baseName;
		if (name != null) {
			// establish unique name
			int cnt = 0;
			Symbol symbol = symbolTable.getVariableSymbol(name, function);
			while (symbol != null) {
				if (namesNotToBeUsed.contains(name)) {
					continue;
				}
				if (symbol.getSymbolType() == SymbolType.PARAMETER) {
					return name;
				}
				name = baseName + (++cnt);
				symbol = symbolTable.getVariableSymbol(name, function);
			}
		}
		return name;
	}
Gets a unique name in the indicated namespace by appending an integer number if necessary
and ignoring any conflicts with existing parameters.
@param symbolTable the symbol table containing symbols for the indicated namespace
@param function the namespace containing symbol names to check.
@param baseName the base name to append with an integer number if necessary to create a
unique name.
@param namesNotToBeUsed set of names that should not be used when determining a unique name.
@return an unused unique name within the namespace ignoring current parameter names and
that doesn't conflict with any in the set of names not to be used.
Ghidra/Features/Base/src/main/java/ghidra/program/util/FunctionUtility.java