void remove(LocationMemento location) {
			for (int i = 0; i < list.size(); i++) {
				LocationMemento loc = list.get(i);
				if (loc.equals(location)) {
					list.remove(i);
					if (currentLocation > 0 && currentLocation >= i) {
						currentLocation--;
					}
					return;
				}
			}
		}
Find the previous history LocationMemento that contains a different function. If no such
LocationMemento is found, null is returned.

@param navigatable the navigatable being navigated
@param moveTo true means after finding, get current location to it. false to just find
           and do nothing
@return previous LocationMemento, or null if no previous function found
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/NavigationHistoryPlugin.java