anchor.diff:          _logger.info(
               "Analysis lookup failed for $package $version (panaVersion=$panaVersion)");
         }
  +    }
  +
  +    if (analysis == null) {
  +      return null;
       }
   
       // analysis was set
  
positive.code:     final Key versionKey =
          packageKey.append(PackageVersionAnalysis, id: version);
  
      bool lookupMatchingPanaVersion = false;
      if (analysis == null) {
        final list = await db.lookup([versionKey]);
        final PackageVersionAnalysis pva = list[0];
  
negative.code:             'PackageVersionAnalysis lookup failed: no entry for $package $version.');
          return null;
        }
        if (panaVersion == null) {
          analysis = pva.latestAnalysis;
        } else {
          final constraint = new VersionConstraint.parse('^${pva.panaVersion}');
          if (constraint.allows(new Version.parse(panaVersion))) {
            analysis = pva.latestAnalysis;
          }
        }
      }
  
      if (analysis == null) {
        final Query query = db.query(Analysis, ancestorKey: versionKey)
          ..filter('panaVersion =', panaVersion);
        final List<Analysis> list = await query.run().toList();
  