> So black must have just made a move that put the queen in that corner square.
True, but only because the position is such that none of black's other possible previous moves would have discovered check on white - well, without already having had white in check; black's bishop could have discovered check from the queen, but it would have had to itself had white in check to do so. (I'm just trying to keep people from jumping to unwarrantedly general conclusions based on this special case.)