Stockfish: Engine suddenly changed the side? I asked this question in stockfishchess.org support but didn't get any response. So I'm trying to get some answers from you all. 

My question:

Please find the output of communication with the engine here. (It has only 8 steps.) The last best move (bestmove c5d4 ponder f3d4) is not for white, but for black.

Am I doing something wrong here or has engine confused for some reason? Appreciate your help to understand.

Original question link: 
http://support.stockfishchess.org/discussions/problems/8262-engine-suddenly-changed-the-side
The reason is very simple:


  position startpos moves e2e4 d7d6 d2d4 e7e6 g1f3 c8d7 f1d3 h7h6 e1g1 c7c5 f1e1 e8f8


This is invalid. The position before e8f8 is:



e8f8 is invalid because Black has a bishop on f8. Stockfish can't play the move, so it just skip it.

To Stockfish, the diagram position is the position it's thinking. The best move is ...cxd4.