anchor.diff:  -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})
  
positive.code:                   {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),
                    {Hash, Count, 1, [], Interval, []}
             end,
      build_childs(T, Config, [Node | Acc]);
  
negative.code: gen_hash_node({_OldHash, Count, _LCnt, Bucket, Interval, [] = Childs},
                _InnerHf, LeafHf, true, CleanBuckets) ->
      % leaf node, no bucket contents, keep_bucket true
      Bucket1 = lists:keysort(1, Bucket),
      Hash = run_leaf_hf(Bucket1, Interval, LeafHf),
      {Hash, Count, 1, ?IIF(CleanBuckets, [], Bucket1), Interval, Childs}.
  
  