Fix desync when viewing history on engine's turn

If you use the history buttons while the engine was thinking, we would
get an "oops! something has gone wrong" once the engine decided to move.