queue2: fix possible data corruption in ring buffer mode when seeking