anchor.diff:           {start_inclusive, true}],
           rewrite_where_with_additional_filters(
               [<<"a">>],
  +            [ascending],
               fun([<<"a">>]) -> sint64 end,
               [{startkey,[{<<"c">>,timestamp,5500}]},
                {endkey,  [{<<"c">>,timestamp,5000}]},
  
positive.code: store_to_where_props(_, _, WhereProps) ->
      WhereProps.
  
  rewrite_start_key_with_filters([], _, _, SKey, SInc) ->
      {SKey, SInc};
  rewrite_start_key_with_filters([AddFieldName|Tail], ToKeyTypeFn, Filter, SKey, SInc1) when is_binary(AddFieldName) ->
      case proplists:get_value(AddFieldName, Filter) of
          {Op,_,_} = F  when Op == '='; Op == '>'; Op == '>=' ->
              SKeyElem = to_key_elem(ToKeyTypeFn, F),
              %% if the quantum was inclusive, make sure we stay inclusive or
              %% the quantum boundary is modified later on
              SInc2 = ((SInc1 /= false) or is_inclusive_op(Op)),
              rewrite_start_key_with_filters(
                  Tail, ToKeyTypeFn, Filter, SKey++[SKeyElem], SInc2);
          _ ->
              %% there is no filter for the next additional field so give up! The
              %% filters must be consecutive, we can't have a '_' inbetween
  
negative.code:     AdditionalFilter = find_filters_on_additional_local_key_fields(
          AdditionalFields, Filter),
      {SKey2, SInc2} = rewrite_start_key_with_filters(
          AdditionalFields, FieldOrders, ToKeyTypeFn, AdditionalFilter, SKey1, SInc1),
      {EKey2, EInc2} = rewrite_end_key_with_filters(
          AdditionalFields, FieldOrders, ToKeyTypeFn, AdditionalFilter, EKey1, EInc1),
      lists:foldl(
          fun({K,V},Acc) -> store_to_where_props(K,V,Acc) end, WhereProps,
          [{startkey,SKey2}, {endkey,EKey2},
  