private BigInteger getLayoutWithinCodeUnit(Address address) {
		CodeUnit cu = model.getProgram().getListing().getCodeUnitContaining(address);
		if (cu == null) {
			return null;
		}

		Address min = cu.getMinAddress();
		while (address.compareTo(min) > 0) {
			address = address.subtract(1);
			Layout layout = model.getLayout(address, false);
			if (layout != null) {
				return addressToIndexMap.getIndex(address);
			}
		}
		return null;
	}
Attempts to find a field location for the given address from the given program location
@param address the address to try and get a layout for.
@param location the location contains other information needed to generate a field
location
@param useDefaultLocation if true, will return a generic location for this address
if no field has a specific match.  Otherwise, will return null if no fields have
an exact match.
@return a field location for the given address.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingModelAdapter.java