ring-buffer: check for swapped buffers in start of committing