private static Address getMaxAddress(CodeUnit cu) {
		if (cu instanceof Instruction inst && inst.isLengthOverridden()) {
			// factor in prototype length when length-override applies
			return cu.getMinAddress().add(inst.getParsedLength() - 1);
		}
		return cu.getMaxAddress();
	}
Get the code unit max address.  Instruction max address will be based upon prototype 
length which may be longer than code unit length if length-override is in effect.
@param cu code unit
@return effective code unit length
Ghidra/Features/Base/src/main/java/ghidra/program/util/DiffUtility.java