anchor.diff:            )
             |> Set.ofSeq
   
  -        let! complement =
  -          xs
  -          |> Seq.choose (fun x ->
  -            match x with
  -            | Complement c -> Some c
  -            | _ -> None
  -          )
  -          |> Seq.toList
  -          |> Constraint.Any
  -          |> loop
  -          |> AsyncSeq.map fst
  -          |> AsyncSeq.fold (fun s x -> Set.add x s) Set.empty
  -
  -        let constraints =
  -          xs
  -          |> List.filter (fun x ->
  -            match x with
  -            | Complement _ -> false
  -            | _ -> true
  -          )
  -          |> List.sort
  -          |> List.distinct
  -
           yield!
             (
  -            if Seq.isEmpty constraints
  +            if Seq.isEmpty xs
               then
                 sourceExplorer.FetchVersions locations package
                 |> AsyncSeq.collect (fun version ->
                   sourceExplorer.FetchLocations locations package version
  -                |> AsyncSeq.map (fun location -> (location, Set.singleton version))
  +                |> AsyncSeq.map (fun location -> Candidate (location, Set.singleton version))
                 )
               else
  -              constraints
  +              xs
  +              |> List.distinct
  +              |> List.sort
                 |> List.map (loop >> (AsyncSeq.scan (fun s x -> Set.add x s) Set.empty))
  -              |> List.reduce (AsyncSeq.combineLatestWith combine)
  +              |> List.reduce (AsyncSeq.combineLatestWith (fun x y ->
  +                let maybeUnsatisfiable =
  +                  x
  +                  |> Set.union y
  +                  |> Seq.tryFind (fun x ->
  +                    match x with
  +                    | Unsatisfiable _ -> true
  +                    | _ -> false
  +                  )
  +
  +                match maybeUnsatisfiable with
  +                | Some unsat -> Set.singleton (unsat)
  +                | None ->
  +                  let a = set (candidates x)
  +                  let b = set (candidates y)
  +
  +                  combine a b |> Set.map Candidate
  +              ))
                 |> AsyncSeq.concatSeq
             )
  -          |> AsyncSeq.filter (fun (location, _) -> Set.contains location complement |> not)
             |> AsyncSeq.distinctUntilChanged
  +          |> appendIfEmpty (Unsatisfiable versionConstraint)
  +
         | Exactly version ->
           yield!
             sourceExplorer.FetchLocations locations package version
  -          |> AsyncSeq.map (fun location -> (location, Set.singleton version))
  +          |> AsyncSeq.map (fun location -> Candidate (location, Set.singleton version))
  +          |> appendIfEmpty (Unsatisfiable versionConstraint)
         | Range (op, v) ->
           yield!
             sourceExplorer.FetchVersions locations package
  
positive.code:           |> AsyncSeq.map (Version.SemVer)
            |> AsyncSeq.collect (fun version ->
              sourceExplorer.FetchLocations locations package version
              |> AsyncSeq.map (fun l -> (l, Set.singleton version))
            )
      }
  
      loop versionConstraint
  
negative.code:           |> List.sortDescending
            |> List.map loop
            |> AsyncSeq.mergeAll
            |> AsyncSeq.filter (fun x ->
              match x with
              | Candidate _ -> true
              | Unsatisfiable _ -> false
            )
            |> AsyncSeq.distinctUntilChanged
            |> appendIfEmpty (Unsatisfiable versionConstraint)
        | All xs ->
          let combine (xs : Set<PackageLocation * Set<Version>>) (ys : Set<PackageLocation * Set<Version>>) =
            xs
  