I have some question on a proof in Huybrechts' "Fourier-Mukai Transfomation in Algebraic Geometry".
Let $ f \colon S \to X$ be a morphism between Noetherian schemes, and we denote by $i_x \colon S_x \to S$ the canonical morphism from the fiber $S_x$ to $S$ (here $x \in X$).
Lemma.3.31
Suppose $\mathcal{Q} \in \text{D}^b(S)$ and assume that for all closed point $x \in X$ the derived pullback $Li_x^* \mathcal{Q}$ is concentrated in degree zero, i.e. isomorphic to a sheaf. Then $\mathcal{Q}$ isomorphic to a sheaf on $S$ which is flat on $X$.
There is a following argument in its proof.
$\mathcal{H}^{-1}(Li_x^*(\mathcal{H}^0(\mathcal{Q}))=0$ for any closed point $x \in X$, and this shows that $\mathcal{H}^0(\mathcal{Q})$ is flat over $X$.
(Notation: $Li_x^*$ is the derived inverse image and $\mathcal{H}^{-1}$ is th $-1$-th cohomology sheaf.)
My question
How to verify this argument?
i.e.
How to prove the next proposition?:
If $\mathcal{F}$ is a coherent sheaf on $S$ such that $\mathcal{H}^{-1}(Li_x^*(\mathcal{F}))=0$ for any closed point $x \in X$, then $\mathcal{F}$ is flat over $X$.
My attempt
We have to prove that for any $s \in S$, $\mathcal{F}_s$ is flat over $\mathcal{O}_{X,f(s)}$.
Firstly, I tried to deal with an affine case. Let $S=\operatorname{Spec} B$ , $X= \operatorname{Spec}A$, $s= \mathfrak{q} \in S$, and $\mathcal{F}=\tilde{M}$ be a sheaf associated to a finitely generated $B$ module. In addition, I assumed $\mathfrak{m}=f(s) \in X$ to be a maximal ideal (equivalently, closed point), so that I can use the assumption $\mathcal{H}^{-1}(Li_x^*(\mathcal{F}))=0$ for closed point $x$.
Then $\mathcal{H}^{-1}(Li_x^*(\mathcal{F}))=0$ is equivelent to $\text{Tor}_1^B(B \otimes_A A/\mathfrak{m}, M)=0$, and we obtain $\text{Tor}_1^{B_\mathfrak{q}}(B_\mathfrak{q}/\mathfrak{m}B_\mathfrak{q}, M_\mathfrak{q})=0$ by localization. Now we want to prove $\text{Tor}_1^{A_\mathfrak{m}}(A_\mathfrak{m}/\mathfrak{m}A_\mathfrak{m}, M_\mathfrak{q})=0$ , since it implies that $M_\mathfrak{q}$ is flat over $A_\mathfrak{m}$. But I have no idea how to conclude it from $\text{Tor}_1^{B_\mathfrak{q}}(B_\mathfrak{q}/\mathfrak{m}B_\mathfrak{q}, M_\mathfrak{q})=0$.
Thank you for your any help!
I happened to meet this lemma in a work by Bridgeland. There is an erratum for the statement which says that we need to assume $f$ to be flat (see the footnote for Lemma 4.3).