Perhaps check first that ```in_buffer.rpos != 0```.