Keep track of visited packages.

This keeps us from vendorizing the same package twice if it exists
in multiple leaves of the import graph.