I think this should also factor in whether `self.buf` is `None` vs `Some` and where `pos` is relative to the array inside `Some`. Could you add a test for this as well?