private boolean updateRootNodes(Function function) {
		GTreeNode root = inTree.getModelRoot();
		// root might be a "PendingRootNode"
		//TODO do we need to use a PendingRootNode?
		if (root instanceof SliceNode) {
			SliceNode sliceNode = (SliceNode) root;
			Function nodeFunction = sliceNode.getRemoteFunction();
			if (nodeFunction.equals(function)) {
				reloadUpdateManager.update();
				return true;
			}
		}

		return false;
	}
NB: This is key as well.

this is called in the doSetFunction method
Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/plugin/core/decompiler/taint/TaintSliceTreeProvider.java