fix bug with 2-fold repetition
when using game history it must be 3-fold, 2-fold only in the search (including root position).

No functional change.
signature = 6727896