anchor.diff:                  WhereProps2 = check_where_clause_is_possible(DDL, WhereProps1),
                   WhereProps3 = rewrite_where_with_additional_filters(
                       Mod:additional_local_key_fields(),
  +                    local_key_field_orders(Mod:field_orders(), PK),
                       fun Mod:get_field_type/1,
                       WhereProps2),
                   {true, WhereProps3};
  
positive.code:             {SKey, SInc1}
      end.
  
  rewrite_end_key_with_filters([], _, _, EKey, EInc) ->
      {EKey, EInc};
  rewrite_end_key_with_filters([AddFieldName|Tail], ToKeyTypeFn, Filter, EKey, EInc1) when is_binary(AddFieldName) ->
      case proplists:get_value(AddFieldName, Filter) of
          {Op,_,_} = F  when Op == '='; Op == '<'; Op == '<=' ->
              EKeyElem = to_key_elem(ToKeyTypeFn, F),
              %% if the quantum was inclusive, make sure we stay inclusive or
              %% the quantum boundary is modified later on
              EInc2 = ((EInc1 /= false) or is_inclusive_op(Op)),
              rewrite_end_key_with_filters(
                  Tail, ToKeyTypeFn, Filter, EKey++[EKeyElem], EInc2);
          _ ->
              %% 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},
  