anchor.diff:      {ok, I} = eleveldb:iterator(T, [], keys_only),
       EndKey = sext:encode({Offset+Size, 0}),
       StartKey = sext:encode({Offset, Size}),
  -
       {ok, FirstKey} = case eleveldb:iterator_move(I, StartKey) of
                            {error, invalid_iterator} ->
  -                             eleveldb:iterator_move(I, first);
  +                             try
  +                                 %% Assume that the invalid_iterator is because
  +                                 %% we tried to move to the end via StartKey.
  +                                 %% Instead, move there directly.
  +                                 {ok, _} = eleveldb:iterator_move(I, last),
  +                                 {ok, _} = eleveldb:iterator_move(I, prev)
  +                             catch
  +                                 _:_ ->
  +                                     {ok, _} = eleveldb:iterator_move(I, first)
  +                             end;
                            {ok, _} = R0 ->
                                case eleveldb:iterator_move(I, prev) of
                                    {error, invalid_iterator} ->
  
positive.code:     DeleteOps = lists:map(fun({O, L, _}) ->
                                    {delete, sext:encode({O, L})}
                            end, Chunks),
      eleveldb:write(T, DeleteOps ++ PutOps, [{sync, true}]).
  
  -spec find_leftneighbor(table(), non_neg_integer()) ->
  
negative.code:                       Acc
                end,
      lists:reverse(eleveldb_fold(T, FirstKey, EndKey, FoldFun, [])).
  
  %% @doc Updates all chunk info, by deleting existing entries if exists
  %% and putting new chunk info
  