protected void checkAncestry(DataType dataType) throws DataTypeDependencyException {
		if (this.equals(dataType)) {
			throw new DataTypeDependencyException(
				"Data type " + getDisplayName() + " can't contain itself.");
		}
		else if (DataTypeUtilities.isSecondPartOfFirst(dataType, this)) {
			throw new DataTypeDependencyException("Data type " + dataType.getDisplayName() +
				" has " + getDisplayName() + " within it.");
		}
	}
This method throws an exception if the indicated data type is an ancestor of
this data type. In other words, the specified data type has a component or
sub-component containing this data type.

@param dataType the data type
@throws DataTypeDependencyException if the data type is an ancestor of this
                                    data type.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/CompositeDB.java