When there are two versions of a lib in the tree and you encounter the older version first, its deps will get enqueued. Right now nothing is happening to later remove any children of the older version if not used by any other libs. The circumstances of this to occur are pretty unusual (as most libs add deps over time, not remove them, and I have not seen it in the wild) but it's easy to construct such a scenario:
Nodes are considered breadth-first, so: a, b, d1, c, e, d2. d1 is selected as the first d found, and e will be enqueued, and selected before encountering d2 (which is then selected in lieu of d1). At this point e is no longer needed but it will currently still be included. This is not too harmful as d2 is not using e, but it's unnecessary.
The info needed to correct this exists in the version-map built during expansion - we are tracking paths to all selected lib versions and e is only included via the path a-d-e and that a-d path is no longer in the selection set. So the step needed is to consider the selection path for all selected libs and verify each parent path is still selected.
Fixed, not yet released
Released in tools.deps.alpha 0.9.755