anchor.diff:  
   update_element_opts(Tuple,KeyPos,UpdPos,Opts) ->
       Set = ets_new(set,[{keypos,KeyPos} | Opts]),
  -    OrdSet = ets_new(ordered_set,
  -                     replace_dbg_hash_fixed_nr_of_locks([ordered_set,{keypos,KeyPos} | Opts])),
       update_element(Set,Tuple,KeyPos,UpdPos),
  -    update_element(OrdSet,Tuple,KeyPos,UpdPos),
       true = ets:delete(Set),
  -    true = ets:delete(OrdSet),
  +
  +    run_if_valid_opts(
  +      [ordered_set,{keypos,KeyPos} | Opts],
  +      fun (OptsOrdSet) ->
  +              OrdSet = ets_new(ordered_set, OptsOrdSet),
  +              update_element(OrdSet,Tuple,KeyPos,UpdPos),
  +              true = ets:delete(OrdSet)
  +      end),
       ok.
   
   update_element(T,Tuple,KeyPos,UpdPos) ->
  
positive.code:     2 = ets:info(T1, size),
  
      %% Same with ordered set.
      T2 = ets_new(b, replace_dbg_hash_fixed_nr_of_locks([ordered_set | Opts])),
      3 = ets:update_counter(T2, foo, 2, {maroilles,1}),
      1 = ets:info(T2, size),
      5 = ets:update_counter(T2, foo, 2, {mimolette,1}),
      1 = ets:info(T2, size),
      [9] = ets:update_counter(T2, foo, [{2,4}], {morbier,1}),
      1 = ets:info(T2, size),
      3 = ets:update_counter(T2, {foo,bar}, 2, {{laguiole},1}),
      2 = ets:info(T2, size),
      5 = ets:update_counter(T2, {foo,bar}, 2, {{saint,nectaire},1}),
      2 = ets:info(T2, size),
      [9] = ets:update_counter(T2, {foo,bar}, [{2,4}], {{rocamadour},1}),
      2 = ets:info(T2, size),
      %% Arithmetically-equal keys.
      3 = ets:update_counter(T2, 1.0, 2, {1,1}),
      3 = ets:info(T2, size),
      5 = ets:update_counter(T2, 1, 2, {1,1}),
      3 = ets:info(T2, size),
      7 = ets:update_counter(T2, 1, 2, {1.0,1}),
      3 = ets:info(T2, size),
      %% Same with reversed type difference.
      3 = ets:update_counter(T2, 2, 2, {2.0,1}),
      4 = ets:info(T2, size),
      5 = ets:update_counter(T2, 2.0, 2, {2.0,1}),
      4 = ets:info(T2, size),
      7 = ets:update_counter(T2, 2.0, 2, {2,1}),
      4 = ets:info(T2, size),
      %% default counter is not an integer.
      {'EXIT',{badarg,_}} = (catch ets:update_counter(T1, qux, 3, {saint,félicien})),
      4 = ets:info(T2, size),
      %% No third element in default value.
      {'EXIT',{badarg,_}} = (catch ets:update_counter(T1, qux, [{3,1}], {roquefort,1})),
      4 = ets:info(T2, size),
      ok.
  
  %% ERL-1125
  
negative.code: 
  update_element_neg(Opts) ->
      Set = ets_new(set,Opts),
      update_element_neg_do(Set),
      ets:delete(Set),
      {'EXIT',{badarg,_}} = (catch ets:update_element(Set,key,{2,1})),
  
      run_if_valid_opts(
        [ordered_set | Opts],
        fun(OptsOrdSet) ->
                OrdSet = ets_new(ordered_set, OptsOrdSet),
                update_element_neg_do(OrdSet),
                ets:delete(OrdSet),
                {'EXIT',{badarg,_}} = (catch ets:update_element(OrdSet,key,{2,1}))
        end),
  
      Bag = ets_new(bag,[bag | Opts]),
      DBag = ets_new(duplicate_bag,[duplicate_bag | Opts]),
  