anchor.diff:          let env, ses' = desugar_decl env id_decl in
           env, ses @ ses'
         in
  -      let bvs = gather_pattern_bound_vars true pat |> set_elements in
  +      let bvs = gather_pattern_bound_vars pat |> set_elements in
         List.fold_left build_projection main_let bvs
   
     | Main t ->
  
positive.code:   | PatTuple  (pats, _)
    | PatOr pats -> gather_pattern_bound_vars_from_list pats
    | PatRecord guarded_pats -> gather_pattern_bound_vars_from_list (List.map snd guarded_pats)
    | PatAscribed (pat, _) -> gather_pattern_bound_vars_maybe_top fail_on_patconst acc pat
  
  let gather_pattern_bound_vars (fail_on_patconst : bool) (p : pattern) : set<Ident.ident> =
    let acc = new_set (fun id1 id2 -> if id1.idText = id2.idText then 0 else 1) in
    gather_pattern_bound_vars_maybe_top fail_on_patconst acc p
  
  type bnd =
    | LocalBinder of bv     * S.aqual
  
negative.code:   | _ ->
      failwith "Not an app pattern"
  
  let rec gather_pattern_bound_vars_maybe_top acc p =
    let gather_pattern_bound_vars_from_list =
        List.fold_left gather_pattern_bound_vars_maybe_top acc
    in
    match p.pat with
    | PatWild _
    | PatConst _
    | PatName _
    | PatOp _ -> acc
    | PatApp (phead, pats) -> gather_pattern_bound_vars_from_list (phead::pats)
    | PatTvar (x, _)
    | PatVar (x, _) -> set_add x acc
  