In his 1988 Paper on Resolutions of Unbounded Complexes, Spaltenstein proves that $Lg^*Rf_! \cong RF_! LG^*$ where $\require{AMScd}$ \begin{CD} A @>F>> B\\ @V G V V @VV g V\\ C @>>f> D \end{CD} is a cartesian square of ringed spaces. He requires an additional finiteness condition for the fibres of $f$, and (and this is my question) that $g$ is flat.
Since $g$ is flat so is $G$, and there is no actual left derived functor. Is there a known example showing that the statement is false without the flatness assumption? Are there newer sources than stuff from the 80s?