void checkDuplicateSymbolName(Address addr, String name, Namespace namespace, SymbolType type)
			throws DuplicateNameException {

		if (addr.isMemoryAddress() && getSymbol(name, addr, namespace) != null) {
			throw new DuplicateNameException(
				"A symbol named " + name + " already exists at this address!");
		}

		if (name.length() == 0) {
			return;
		}

		if (type.allowsDuplicates()) {
			return;
		}

		Symbol symbol = getFirstSymbol(name, namespace, s -> !s.getSymbolType().allowsDuplicates());
		if (symbol != null) {
			throw new DuplicateNameException("A " + symbol.getSymbolType() + " symbol with name " +
				name + " already exists in namespace " + symbol.getParentNamespace().getName());
		}
	}
Save off old local symbols whose upgrade needs to be deferred until after function manager
upgrade has been completed.

@param tmpHandle scratch pad database handle
@param symbolID local symbol ID
@param oldAddr old address value from symbol table
@param name symbol name
@param isPrimary true if symbol is primary at oldAddr
@throws IOException if there is database exception
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/SymbolManager.java