Merge "libsnapshot: add check for updating next_data_pos_" into main