Perl: make pinned versions work.

We don't have access to an export which allows us to find previous
distributions, but we can assert a bunch of shaky premises and try to
find it anyway.