anchor.diff:  
   reduce_clauses([H | T], Acc, OldStack, SAcc, S) ->
     {TH, TS} = each_clause(H, SAcc),
  -  reduce_clauses(T, TH ++ Acc, OldStack, elixir_erl_var:discard_vars(TS, S), S);
  +  reduce_clauses(T, [TH | Acc], OldStack, elixir_erl_var:discard_vars(TS, S), S);
   reduce_clauses([], Acc, OldStack, SAcc, _S) ->
     {lists:reverse(Acc), SAcc#elixir_erl{stacktrace=OldStack}}.
   
  
positive.code: 
  %% Helpers
  
  build_rescue(Meta, Parts, Body, S) ->
    Matches = [Match || {Match, _} <- Parts],
  
    {{clause, Line, TMatches, _, TBody}, TS} =
      elixir_erl_clauses:clause(Meta, fun elixir_erl_pass:translate_args/2, Matches, Body, [], S),
  
    TClauses =
      [begin
         TGuards = elixir_erl_clauses:guards(Guards, [], TS),
         build_clause(Line, {atom, Line, error}, TMatch, TGuards, TBody, TS)
       end || {TMatch, {_, Guards}} <- lists:zip(TMatches, Parts)],
  
    {TClauses, TS}.
  
  %% Convert rescue clauses ("var in [alias1, alias2]") into guards.
  rescue_guards(_Meta, _Var, [], S) ->
    {[], [], S};
  rescue_guards(Meta, Var, Aliases, S) ->
    %% TODO: We emit two clauses here because we cannot access map fields
    %% before Erlang/OTP 21. So in the future we can compile this code in a
    %% way to emit a single clause for both Erlang and Elixir and also
    %% simplify build_rescue.
    {ErlangGuards, ErlangAliases} = rescue_each_ref(Meta, Var, Aliases, [], [], S),
  
    %% Compute the optional Erlang check
    ErlangParts =
      case ErlangGuards of
        [] -> [];
        _  -> [{Var, ErlangGuards}]
      end,
  
    %% Compute the always present Elixir check
    {VarName, _, CS} = elixir_erl_var:build('_', S),
    StructVar = {VarName, Meta, 'Elixir'},
    Map = {'%{}', Meta, [{'__struct__', StructVar}, {'__exception__', true}]},
    Match = {'=', Meta, [Map, Var]},
    ElixirGuards = [{erl(Meta, '=='), Meta, [StructVar, Alias]} || Alias <- Aliases],
    {[{Match, ElixirGuards} | ErlangParts], ErlangAliases, CS}.
  
  build_clause(Line, Kind, Expr, Guards, Body, #elixir_erl{stacktrace=Var}) ->
    Match = {tuple, Line, [Kind, Expr, {var, Line, Var}]},
    {clause, Line, [Match], Guards, Body}.
  
  %% Rescue each atom name considering their Erlang or Elixir matches.
  %% Matching of variables is done with Erlang exceptions is done in
  %% function for optimization.
  
  rescue_each_ref(Meta, Var, [H | T], Guards, Aliases, S) when is_atom(H) ->
    case erl_rescue_guard_for(Meta, Var, H) of
      false -> rescue_each_ref(Meta, Var, T, Guards, Aliases, S);
      Expr  -> rescue_each_ref(Meta, Var, T, [Expr | Guards], [H | Aliases], S)
    end;
  rescue_each_ref(_, _, [], Guards, Aliases, _) ->
    {Guards, Aliases}.
  
  %% Handle Erlang rescue matches.
  
negative.code:   {{clause, Line, [TKind, TMatches], TGuards, TBody}, TS} =
      elixir_erl_clauses:clause(Meta, fun elixir_erl_pass:translate_args/2, Match, Expr, Guards, S),
  
    build_clause(Line, TKind, TMatches, TGuards, TBody, TS);
  
  each_clause({rescue, Meta, [{in, _, [Left, Right]}], Expr}, S) ->
    {TempName, _, CS} = elixir_erl_var:build('_', S),
    TempVar = {TempName, Meta, ?var_context},
    {Guards, ErlangAliases} = rescue_guards(Meta, TempVar, Right),
    Body = normalize_rescue(Meta, TempVar, Left, Expr, ErlangAliases),
    build_rescue(Meta, TempVar, Guards, Body, CS);
  
  each_clause({rescue, Meta, [{VarName, _, Context} = Left], Expr}, S) when is_atom(VarName), is_atom(Context) ->
    {TempName, _, CS} = elixir_erl_var:build('_', S),
    TempVar = {TempName, Meta, ?var_context},
    Body = normalize_rescue(Meta, TempVar, Left, Expr, ['Elixir.ErlangError']),
    build_rescue(Meta, TempVar, [], Body, CS).
  
  normalize_rescue(_Meta, _Var, {'_', _, Atom}, Expr, _) when is_atom(Atom) ->
    Expr;
  