private boolean resolveLocalNameConflict(Function toFunc, String name) {
		SymbolTable toSymTab = toFunc.getProgram().getSymbolTable();
		Symbol nameSpaceSymbol = toSymTab.getVariableSymbol(name, toFunc); // Another symbol with the same name in the namespace.
		if (nameSpaceSymbol != null && nameSpaceSymbol.getSource() != SourceType.DEFAULT) {
			// If we run into the name already in toFunc on a different variable
			// then temp rename it so we can proceed.
			if (renameVarUniquely(nameSpaceSymbol, nameSpaceSymbol.getSource()) == null) {
				errorMsg.append("Can't replace variable due to name conflict: " +
					nameSpaceSymbol.getName(true) + "\n");
				return false;
			}
			String msg = "Renamed symbol '" + name + "' in function '" + toFunc.getName() +
				"' to '" + nameSpaceSymbol.getName() + "' due to conflict with local variable.\n";
			infoMsg.append(msg);
		}
		return true;
	}
Replaces the local symbols in toFunc with the local symbols that are in the fromFunc.
@param toFunc the function having its local variables replaced.
@param fromFunc the source of the replacement variables.
@throws CancelledException if user cancels via the monitor.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMerge.java