anchor.diff:  sub_set_name(V, Val, #sub{v=S,s=Scope,t=Tdb0}=Sub) ->
       Tdb1 = kill_types(V, Tdb0),
       Tdb = copy_type(V, Val, Tdb1),
  -    Sub#sub{v=orddict:store(V, Val, S),s=gb_sets:add(V, Scope),t=Tdb}.
  +    Sub#sub{v=orddict:store(V, Val, S),s=cerl_sets:add_element(V, Scope),t=Tdb}.
   
   sub_del_var(#c_var{name=V}, #sub{v=S,s=Scope,t=Tdb}=Sub) ->
       %% Profiling shows that for programs with many record operations,
       %% sub_del_var/2 is a bottleneck. Since the scope contains all
       %% variables that are live, we know that V cannot be present in S
       %% if it is not in the scope.
  -    case gb_sets:is_member(V, Scope) of
  +    case cerl_sets:is_element(V, Scope) of
   	false ->
  -	    Sub#sub{s=gb_sets:insert(V, Scope)};
  +	    Sub#sub{s=cerl_sets:add_element(V, Scope)};
   	true ->
   	    Sub#sub{v=orddict:erase(V, S),t=kill_types(V, Tdb)}
       end.
  
positive.code: %%  to force renaming if variables in the scope occurs as pattern
  %%  variables.
  
  sub_new() -> #sub{v=orddict:new(),s=gb_sets:empty(),t=[]}.
  
  sub_new(#sub{}=Sub) ->
      Sub#sub{v=orddict:new(),t=[]}.
  
negative.code: verify_scope(E, #sub{s=Scope}) ->
      Free0 = cerl_trees:free_variables(E),
      Free = [V || V <- Free0, not is_tuple(V)],	%Ignore function names.
      case ordsets:is_subset(Free, cerl_sets:to_list(Scope)) of
  	true -> true;
  	false ->
  	    io:format("~p\n", [E]),
  	    io:format("~p\n", [Free]),
  	    io:format("~p\n", [cerl_sets:to_list(Scope)]),
  	    false
      end.
  -endif.
  