anchor.diff:                    {nil, Count, 1, Bucket, Interval, []};
                 true ->
                     % need to hash here since we won't keep the bucket!
  -                  Hash = run_leaf_hf(lists:ukeysort(1, Bucket), Interval,
  -                                     Config#mt_config.leaf_hf),
  +                  Bucket1 = lists:keysort(1, Bucket),
  +                  Hash = run_leaf_hf(Bucket1, Interval, Config#mt_config.leaf_hf),
                     {Hash, Count, 1, [], Interval, []}
              end,
       build_childs(T, Config, [Node | Acc]);
  
positive.code: %%      e.g. [{branch_factor, 32}, {bucket_size, 16}]
  -spec new(mt_interval(), mt_config_params()) -> merkle_tree().
  new(I, ConfParams) ->
      Config = build_config(ConfParams),
      [Root] = build_childs([{I, 0, []}], Config, []),
      gen_hash({merkle_tree, Config, Root}).
  
  %% @doc Creates a new empty merkle tree with the given params and interval and
  %%      inserts entries from EntryList.
  
negative.code: -spec run_leaf_hf(mt_bucket(), intervals:interval(), LeafHf::hash_fun())
          -> mt_node_key().
  run_leaf_hf(Bucket, I, LeafHf) ->
      ?DBG_ASSERT(lists:ukeysort(1, Bucket) =:= Bucket),
      BinBucket = case Bucket of
                      [_|_] -> term_to_binary(Bucket);
                      []    -> term_to_binary({0, I})
  