The transition sort key is a tuple of keys identifying candidate
destinations. For the tuple values to be comparable they must be
element-wise comparable; normal keys are non-negative integers, so
change the flag value for transitions without consuming states to be -1
which is comparable with other states under Python 3.