redo the previous patch to instead initialize max_offset correctly before we invoke...