private Address getNextAddress(Address addr) {

		Instruction instr = listing.getInstructionAfter(addr);
		Address instrAddr = instr != null ? instr.getMinAddress() : null;

		return instrAddr;
// ?? ITERATOR HAS BEEN MODIFIED TO ONLY RETURN INSTRUCTION BLOCKS

//        Data data = getDefinedDataAfter(addr);
//        Address dataAddr = data != null ? data.getMinAddress() : null;
//        
//        if (instrAddr != null) {
//        	if (dataAddr != null) {
//        		return (instrAddr.compareTo(dataAddr) < 0) ? instrAddr : dataAddr;
//        	}
//        	else {
//        		return instrAddr;
//        	}
//        }
//        return dataAddr;
	}
Find the next Address that starts a valid block
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/SimpleBlockIterator.java