ropes: Fix some bugs in `RopeBuffer` (again)

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>