public void saveOriginalNameIfNeeded(Namespace oldNamespace, String oldName,
			SourceType oldSource) {

		boolean wasInLibrary = (oldNamespace instanceof Library);

		// if we don't have an original already set and it is an imported symbol, save it
		String originalImportedName = getOriginalImportedName();
		if (getLabel().equals(originalImportedName)) {
			symbol.setExternalOriginalImportedName(null, false);
		}
		else if (wasInLibrary && getSource() != SourceType.DEFAULT &&
			oldSource == SourceType.IMPORTED && originalImportedName == null) {
			symbol.setExternalOriginalImportedName(oldName, false);
		}
	}
Set the label and optional namespace associated with an external location.
Any non-existing namespace will be created as a simple namespace within the associated
library.
@param label external location label.  The label may be qualified with a namespace
and best effort will be used to parse it (see {@link SymbolPath}).
If a namespace is not included within label, the current namespace will be preserved.
@param source the source of this external symbol:
Symbol.DEFAULT, Symbol.ANALYSIS, Symbol.IMPORTED, or Symbol.USER_DEFINED
@throws InvalidInputException if the name contains illegal characters (space for example)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/external/ExternalLocationDB.java