> if (PyInt_Check(value)) { > long rev = PyInt_AS_LONG(value); > - return rev >= -1 && rev < index_length(self); > + return rev >= -1 && rev < index_length(self) - 1; Fixed this to `index_length(self) + 1`. Maybe you'll want to drop `+ 1` by a later patch, but excluding the tip rev is clearly wrong.