#927 consider a nil cursor the end of pagination