Made next_impl interface return LAST_OF_BATCH information.