anchor.diff:    | 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> =
  +  | PatAscribed (pat, _) -> gather_pattern_bound_vars_maybe_top acc pat
  +
  +let gather_pattern_bound_vars : 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
  +  fun p -> gather_pattern_bound_vars_maybe_top acc p
   
   type bnd =
     | LocalBinder of bv     * S.aqual
  
positive.code:   | _ ->
      failwith "Not an app pattern"
  
  let rec gather_pattern_bound_vars_maybe_top fail_on_patconst acc p =
    let gather_pattern_bound_vars_from_list =
        List.fold_left (gather_pattern_bound_vars_maybe_top fail_on_patconst) acc
    in
    match p.pat with
    | PatWild _
    | PatName _
    | PatOp _ -> acc
    | PatConst _ ->
      if fail_on_patconst
      then raise_error (Errors.Error_CannotRedefineConst, "Constants cannot be redefined") p.prange
      else acc
  
    | PatApp (phead, pats) -> gather_pattern_bound_vars_from_list (phead::pats)
    | PatTvar (x, _)
    | PatVar (x, _) -> set_add x acc
  
negative.code:         let env, ses' = desugar_decl env id_decl in
          env, ses @ ses'
        in
        let bvs = gather_pattern_bound_vars pat |> set_elements in
        List.fold_left build_projection main_let bvs
  
    | Main t ->
  