Call  rope.base.simplify.read_code before computing the offset.