private DataType resolve(long id, DataTypeManager dtm,
			MyIdentityHashMap<Long, DataType> resolvedDataTypes) {

		DataType dt = getResolvedComponent(id, resolvedDataTypes);
		if (dt == null && resolvedDataTypes.containsKey(id)) {
			// previously resolved datatype is no longer valid
			return null;
		}

		if (dt == null && !myDtAddedList.contains(Long.valueOf(id))) {
			// use data type from RESULT if we did not add it
			dt = dtms[RESULT].getDataType(id);
		}

		if (dt == null) {
			DataType otherDt = dtm.getDataType(id);
			if (otherDt instanceof BuiltIn) {
				return otherDt; // don't let deleted BuiltIn stop us fro using one
			}
			boolean doCheck = false;
			DataType baseDt = otherDt;
			if (baseDt instanceof TypeDef td) {
				baseDt = td.getDataType();
				long baseID = dtm.getID(baseDt);
				if (!myDtAddedList.contains(Long.valueOf(baseID))) {
					return null; // pre-existing typedef was removed
				}
				doCheck = true;
			}
			if ((baseDt instanceof Pointer) || (baseDt instanceof Array)) {
				baseDt = DataTypeUtilities.getBaseDataType(baseDt);
				doCheck = true;
			}

			if (doCheck) {
				long baseID = dtm.getID(baseDt);
				DataType rdt = resolve(baseID, dtm, resolvedDataTypes);
				if ((rdt != null && !rdt.isDeleted()) || (baseDt instanceof BuiltIn)) {
					// base data type was resolved or is BuiltIn/DEFAULT, so add derived datatype
					dt = addDataType(id, otherDt, resolvedDataTypes);
				}
			}
		}
		if (dt != null && dt.isDeleted()) {
			return null;
		}
		return dt;
	}
Fix up the Union by going through all of the fix up info objects that
have the given ID.
@param id id of the Union
@param union union that is updated
@param firstFixupIndex first applicable fixupList entry index
@param fixupCount total number of fixup entries to be applied
@param unresolvedFixups list to which unprocessed fixups should be added
Ghidra/Features/Base/src/main/java/ghidra/app/merge/datatypes/DataTypeMergeManager.java