Let $f \colon X \to Y$ be a proper morphism of (Noetherian) schemes, $\mathcal{F} \in \mathop{Coh}(X)$. Let $i_Z \colon Z \hookrightarrow Y$ be a closed subscheme and take the inverse image $W := X \times_Y Z \overset{i_W}{\hookrightarrow} X$.

If we assume that $\dim X_y \leq k - 1$ for all $y \in Y \setminus Z$, then the sheaf $R^k f_{*}(\mathcal{F})$ is concentrated on $Z$ by flat base change for the open inclusion $Y \setminus Z \to Y$.

Is it true in this case that $$R^k f_{*}(\mathcal{F}) \cong i_{Z*} R^k (f|_W)_{*}(\mathcal{F}|_{W})$$ where $\mathcal{F}|_{W} = i_W^{*}(\mathcal{F})$?

I was not able to derive this from the standard results about base change, nor to find any counterexamples.

**Special case:** What I actually need is a rather special case of the former. Namely in the case I am insterested in:

- all objects are varieties over an algebraically closed field
- $X$, $Z$ and $W$ are smooth
- $\mathcal{F}$ is a line bundle
- $k = 1$
- the map $X \setminus W \to Y \setminus Z$ is an isomorphism.

It interesting to know something about the general case, though.