"cdef list" variable generates incorrect PyList_SetItem code

The first function below "in_range" works fine (the last line
generates a call to PyObject_SetItem) but the "out_of_range" function does not. The last line in it generates a call to PyList_SetItem as it should, but the 'ob' PyObject is not converted to a Py_ssize_t.