locate: better handling of packed modules

Get rid of the cwd-related heuristic.
The case described in #284 should be handled.
locate: reset fallback on new calls (bugfix)