Bug 41927 [Dialogs] Selecting in PreferenceDialog generates too many invalid entries
20030825 If you select an entry, close the dialog and then reopen it selecting anotehr entry will result in a "this page has invalid values" although you selected nothing.
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
* If there is no match then return the first one,
	 */
	private TreeItem getLastSelectedNode(TreeItem[] items) {
		String lastSelectedNode = getSelectedNodePreference();
		if (lastSelectedNode == null)
			return items[0];
		TreeItem selectedItem = findNodeMatching(items, lastSelectedNode);
		if (selectedItem == null)
			return items[0];
		else
			return selectedItem;
	}
	/**
	 * Find the TreeItem that has data the same id as the nodeId.
	 * Search the children recursively.
	 * @return TreeItem or null if not found.
	 */
	private TreeItem findNodeMatching(TreeItem[] items, String nodeId) {
		for (int i = 0; i < items.length; i++) {
			Object data = items[i].getData();
			if (data instanceof IPreferenceNode) {
				if (((IPreferenceNode) data).getId().equals(nodeId))
					return items[i];
				else {
					TreeItem selectedChild =
						findNodeMatching(items[i].getItems(), nodeId);
					if (selectedChild != null)
						return selectedChild;
				}
			}