public int getIndexAfterFirstInstance(List<SequenceItem> prefixSequence) {
		if (prefixSequence == null) {
			return 0;
		}
		if (prefixSequence.isEmpty()) {
			return 0;
		}
		int index = 0;
		for (SequenceItem item : prefixSequence) {
			if ((item.getIndex() + 1) > sequence.length()) {
				index = -1;
				break;
			}
			String symbol = sequence.substring(item.getIndex(), item.getIndex() + 1);
			if (!symbol.equals(item.getSymbol())) {
				index = -1;
				break;
			}
			index = item.getIndex() + 1;
		}
		return index;
	}
If all items in {@code prefixSequence} occur in {@code sequence}, returns
the index of the item in {@code sequence} immediately after the last item
in {@code prefixSequence}.  If {@code prefixSequence} does not occur in 
{{@code sequence} as a subsequence, then this method returns -1.

<p>Note: this method assumes that {@code prefixSequence} is sorted in
ascending order of Item.index.

@param prefixSequence prefix
@return index
Ghidra/Features/BytePatterns/src/main/java/ghidra/closedpatternmining/Sequence.java