anchor.diff:    | _ ->
       failwith "Not an app pattern"
   
  -let rec gather_pattern_bound_vars_maybe_top fail_on_patconst acc p =
  +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 fail_on_patconst) acc
  +      List.fold_left gather_pattern_bound_vars_maybe_top acc
     in
     match p.pat with
     | PatWild _
  +  | PatConst _
     | 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
  
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: 
      | Abs(binders, body) ->
        (* First of all, forbid definitions such as `f x x = ...` *)
        let bvss = List.map gather_pattern_bound_vars binders in
        let check_disjoint (sets : list<set<ident>>) : option<ident> =
          let rec aux acc sets =
              match sets with
  