Let $\mathcal{I}$ be a sheaf of ideals on the scheme $X$ which is not necessarily locally generated by sections.
Following the construction of a closed subscheme where we set $Z = \text{supp}(\mathcal{O}_X/\mathcal{I})$ and $\mathcal{O}_Z = i^{-1}(\mathcal{O}_X/\mathcal{I})$ where $i: Z \rightarrow X$ denotes the inclusion, where does this construction fail to produce a closed subscheme of $X$ in general?
The subset $Z$ should be closed as the support of a sheaf of rings (or as a quotient of a sheaf which is locally generated by sections: $\mathcal{O}_X$). Further, using the definition of $\mathcal{O}_Z$, one should be able to prove that $i_*\mathcal{O}_Z \simeq \mathcal{O}_X/\mathcal{I}$ from which we can deduce that the morphism of sheaves $i^\#:\mathcal{O}_X \to i_*\mathcal{O}_Z$ is surjective.
I'm pretty sure that I miss either a very subtile point or an even more obvious one. If you could help me out, I would appreciate that a lot.
Let $R,\mathfrak m$ be a discrete valuation ring and $X=\operatorname {Spec}(R)=\{m,\eta\}$ be the associated affine scheme with generic point $\eta$ and closed point $m$.
Consider now the (not quasi-coherent) ideal sheaf $\mathcal I\subset \mathcal O_X$ defined by $\mathcal I(X)=0$ and $\mathcal I(\{\eta\})=K$.
Its zero abelian group of global sections certainly doesn't generate the fibre $\mathcal I_\eta=K$.
The support of $\mathcal I$ is $\{\eta\}$, which is not closed, and $\mathcal I$ does not define a closed subscheme of $X$.