Add back some safeguards on the index elements that were lost in the last patch.  Dave Ascher found a case that dumps core without these:
Add back some safeguards on the index elements that were lost in the
last patch.  Dave Ascher found a case that dumps core without these:

def myComparison(x,y):
    return cmp(x%3,y%7)

z = range(12)
z.sort(myComparison)

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator