anchor.diff:      %% evaluation of More now. Evaluating More here could also reduce the
       %% number variables in the environment for letrec.
       {Mc,Mps,St1} = safe(More, St0),
  -    {Y,Yps,St} = lc_tq(Llc, E, Qs, Mc, St1),
  +    {Qs,St2} = preprocess_quals(Llc, Qs0, St1),
  +    {Y,Yps,St} = lc_tq(Llc, E, Qs, Mc, St2),
       {Y,Mps++Yps,St};
   expr({op,L,'andalso',E1,E2}, St0) ->
       {#c_var{name=V0},St} = new_var(L, St0),
  
positive.code:     {T1,Tps,St2} = safe(T0, St1),
      A = lineno_anno(L, St2),
      {ann_c_cons(A, H1, T1),Hps ++ Tps,St2};
  expr({lc,L,E,Qs}, St) ->
      lc_tq(L, E, Qs, #c_literal{anno=lineno_anno(L, St),val=[]}, St);
  expr({bc,L,E,Qs}, St) ->
      bc_tq(L, E, Qs, {nil,L}, St);
  expr({tuple,L,Es0}, St0) ->
  
negative.code: 
  %% bc_tq(Line, Exp, [Qualifier], More, State) -> {LetRec,[PreExp],State}.
  %%  This TQ from Gustafsson ERLANG'05.  
  %%  More could be transformed before calling bc_tq.
  
  bc_tq(Line, Exp, Qs0, _, St0) ->
      {BinVar,St1} = new_var(St0),
      {Sz,SzPre,St2} = bc_initial_size(Exp, Qs0, St1),
      {Qs,St3} = preprocess_quals(Line, Qs0, St2),
      {E,BcPre,St} = bc_tq1(Line, Exp, Qs, BinVar, St3),
      Pre = SzPre ++
  	[#iset{var=BinVar,
  	       arg=#iprimop{name=#c_literal{val=bs_init_writable},
  			    args=[Sz]}}] ++ BcPre,
      {E,Pre,St}.
  
  bc_tq1(Line, E, [#igen{anno=GAnno,acc_pat=AccPat,acc_guard=AccGuard,
                         skip_pat=SkipPat,tail=Tail,tail_pat=TailPat,
                         arg={Pre,Arg}}|Qs], Mc, St0) ->
      {Name,St1} = new_fun_name("lbc", St0),
      LA = lineno_anno(Line, St1),
      LAnno = #a{anno=LA},
      {Vars=[_,AccVar],St2} = new_vars(LA, 2, St1),
      F = #c_var{anno=LA,name={Name,2}},
      Nc = #iapply{anno=GAnno,op=F,args=[Tail,AccVar]},
      Fc = function_clause(Vars, LA, {Name,2}),
      TailClause = #iclause{anno=LAnno,pats=[TailPat,AccVar],guard=[],
                            body=[AccVar]},
      Cs0 = case {AccPat,AccGuard} of
                {SkipPat,[]} ->
                    %% Skip and accumulator patterns are the same and there is
                    %% no guard, no need to generate a skip clause.
                    [TailClause];
                _ ->
                    [#iclause{anno=#a{anno=[compiler_generated|LA]},
                              pats=[SkipPat,AccVar],guard=[],body=[Nc]},
                     TailClause]
            end,
      {Cs,St4} = case AccPat of
                     nomatch ->
                         %% The accumulator pattern never matches, no need
                         %% for an accumulator clause.
                         {Cs0,St2};
                     _ ->
                         {Bc,Bps,St3} = bc_tq1(Line, E, Qs, AccVar, St2),
                         Body = Bps ++ [#iset{var=AccVar,arg=Bc},Nc],
                         {[#iclause{anno=LAnno,
                                    pats=[AccPat,AccVar],guard=AccGuard,
                                    body=Body}|Cs0],
                          St3}
                 end,
      Fun = #ifun{anno=LAnno,id=[],vars=Vars,clauses=Cs,fc=Fc},
      {#iletrec{anno=LAnno#a{anno=[list_comprehension|LA]},defs=[{{Name,2},Fun}],
                body=Pre ++ [#iapply{anno=LAnno,op=F,args=[Arg,Mc]}]},
       [],St4};
  bc_tq1(Line, E, [#ifilter{}=Filter|Qs], Mc, St) ->
      filter_tq(Line, E, Filter, Mc, St, Qs, fun bc_tq1/5);
  bc_tq1(_, {bin,Bl,Elements}, [], AccVar, St0) ->
      {E,Pre,St} = expr({bin,Bl,[{bin_element,Bl,
  				{var,Bl,AccVar#c_var.name},
  