Skip unneeded costly computation of transitive reduction

Gives a huge speedup on some trivial requests (1.49s -> 0.67s on my example, trying
to install an already installed package)

Ref: #1363
Merge pull request #1383 from OCamlPro/faster-better

Skip unneeded costly computation of transitive reduction