btree: fix tree corruption in btree_get_prev()