private void getNextInSet() throws CancelledException {
		// find next address that has a valid block;
		Address addr = getNextAddress(nextAddr);

		// if the instruction's start address is in our set
		// then we have our block
		if (addr != null && addrSet.contains(addr)) {
			nextBlock = model.getCodeBlockAt(addr, monitor);
			if (nextBlock != null) {
				nextAddr = nextBlock.getMaxAddress();
				return;
			}
		}

		// otherwise we're out of our current address range in
		// our address range set so we find the next address range
		// with a min address >= the instructions address and
		// look for a block there
		//nextAddr = instr.getMaxAddress();
		while (rangeIter.hasNext()) {
			AddressRange range = rangeIter.next();

			if (nextAddr.compareTo(range.getMinAddress()) >= 0) {
				continue;
			}

			nextBlock = getFirstInRange(range);
			// if we find a block we're done
			if (nextBlock != null) {
				nextAddr = nextBlock.getMaxAddress();
				return;
			}
			// if we find no block then there's no block in the
			// current range and we can move on to the next one
		}
		nextBlock = null;
	}
Called for iterators restricted by an address range set,
it will find the next block and set up nextBlock and
nextAddr accordingly.
@throws CancelledException if the monitor cancels the operation.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleBlockIterator.java