Bug #280336, comment #2 - Clear the package selection cache when packages
are added to the graph. This fixes incorrect choices that happen in some
cases.

svn path=/main/trunk/; revision=14922
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 038ae6f..a461731 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -997,6 +997,7 @@
 				self._dynamic_config._slot_pkg_map[pkg.root][pkg.slot_atom] = pkg
 				self._dynamic_config.mydbapi[pkg.root].cpv_inject(pkg)
 				self._dynamic_config._filtered_trees[pkg.root]["porttree"].dbapi._clear_cache()
+				self._dynamic_config._highest_pkg_cache.clear()
 				self._check_masks(pkg)
 
 			if not pkg.installed: