private CodeBlock getFirstInRange(AddressRange range) throws CancelledException {
		Address addr = range.getMinAddress();
		if (addr == null) {
			return null;
		}
		do {
			CodeBlock block = model.getFirstCodeBlockContaining(addr, monitor);
			if (block != null) {
				CodeUnit codeUnit = listing.getCodeUnitAt(block.getMinAddress());
				if (codeUnit instanceof Instruction)
					return block;
// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS

//		    	if (codeUnit instanceof Data) {
//		    		// Only data blocks which reference an instruction are valid
//		    		if (dataReferencesInstruction((Data)codeUnit)) {
//		    			return block;
//		    		}
//		    	}
//		    	else {
//		    		// Instruction block is always valid
//		    		return block;	
//		    	}
				addr = block.getMaxAddress();
			}
			addr = getNextAddress(addr);
		}
		while (!monitor.isCancelled() && addr != null && range.contains(addr));    // while still in range

		return null;
	}
Finds the first block occurring in the given range.
@param range  the range to look for the block in.
@return will return null if no code block can be found.
@throws CancelledException if the monitor cancels the operation.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleBlockIterator.java