Avoiding hash collisions of a match with its reverse