public void removeUnusedOptions() {
		List<String> optionNames = new ArrayList<>(valueMap.keySet());
		for (String optionName : optionNames) {
			Option optionState = valueMap.get(optionName);
			if (!optionState.isRegistered()) {
				removeOption(optionName);
			}
		}
	}
Check each option to ensure that an owner is still registered for it;
if there is no owner, then remove the option.
Ghidra/Framework/Gui/src/main/java/ghidra/framework/options/ToolOptions.java