Presumably this won't work if the version is null and SQL is unavailable. IMO, it would be useful to have a _packageService instance (or perhaps IPackageLookup instance that IPackageService implements) that is backed by SQL or Lucene which might get us identical behavior in both scenarios.