I hadn't seen this particular failure yet, but you're totally right that it can happen.  I just pushed 516ae19 with a fix to ensure the comparison is done on sorted lists.