private void findNext() {
			if (nextSymbolAddress == null) {
				nextSymbolAddress = getNextSymbolAddress();
			}
			if (nextRefAddress == null) {
				nextRefAddress = getNextRefAddress();
			}
			if (nextSymbolAddress == null) {
				nextAddress = nextRefAddress;
				nextRefAddress = null;
			}
			else if (nextRefAddress == null) {
				nextAddress = nextSymbolAddress;
				nextSymbolAddress = null;
			}
			else {
				int compareResult = nextSymbolAddress.compareTo(nextRefAddress);
				if (compareResult == 0) {
					nextAddress = nextSymbolAddress;
					nextSymbolAddress = null;
					nextRefAddress = null;
				}
				else if ((forward && compareResult < 0) || (!forward && compareResult > 0)) {
					nextAddress = nextSymbolAddress;
					nextSymbolAddress = null;
				}
				else {
					nextAddress = nextRefAddress;
					nextRefAddress = null;
				}
			}
		}
Move primary symbol to last element in array ...
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchtext/databasesearcher/LabelFieldSearcher.java