Hartshorne Exercise II.6.10 Proving existence of a filtration for coherent sheaves supported on a closed subscheme. Fix $X$ a Noetherian scheme and $\mathscr{F}$ a coherent sheaf on $X$ whose support is contained inside some closed subscheme $Y\subseteq X$. I would like to show that there is a filtration
$$
0=\mathscr{F}_n\subseteq\dots\subseteq \mathscr{F}_1\subseteq \mathscr{F}_0=\mathscr{F}
$$
in which each $\mathscr{F}_i/\mathscr{F}_{i+1}$ is an $\mathcal{O}_Y$-module. It is easy to see how this implies the main result (exactness of the sequence $K(Y)\rightarrow K(X)\rightarrow K(X-Y)\rightarrow 0$ of Grothendieck groups in the middle). Unfortunately, I have been unable to establish existence of this finite filtration.
Following the general principle that I should try to reduce problems down to commutative algebra, I am aware of the following result (taken from Bourbaki's Commutative Algebra text)
[Bourbaki's Algebre Commutative, Chap. IV n$^\circ$4 Theoreme 2]
Fix $A$ a noetherian ring and $M$ a finitely generated $A$-module. Then there is a filtration of modules $0=M_n\subseteq \dots\subseteq M_1\subseteq M_0=M$ with $M_i/M_{i+1}\cong A/ \mathfrak{p}_i$ where
$$
\operatorname{Ass}(M)\subseteq\{\mathfrak{p}_0,\mathfrak{p}_2,\dots,\mathfrak{p}_{n-1}\}\subseteq\operatorname{Supp}(M).
$$
This result easily gives the existence of a filtration in the affine case. However, I am unable to "glue" together these filtrations to a filtration of $\mathscr{F}$ itself.
I am also unable to locate a reference which proves existence of the filtration outside of this "solutions manual" which I have not read yet. On a quick glance, it appears sound to me, but I am curious to see if the above proof can be made to work.
I will appreciate either a reference or a good explanation why the first approach could not work (or even a proof that it could work!). Thank you.
 A: The problem I think is that the affine filtrarion you are quoting is not "canonically constructed", and so it is not clear how can we glue them. For instance, imagine that $R=\mathbb{Z}$ and $M=\mathbb{Z}^2$. We can take the filtration $0 \subseteq 2\mathbb{Z} \times \{0\} \subseteq \mathbb{Z}\times \{0\} \subseteq \mathbb{Z} \times 3\mathbb{Z} \subseteq \mathbb{Z}^2$, which has $\mathfrak{p}_0=3\mathbb{Z}$, $\mathfrak{p}_1=0$, $\mathfrak{p}_2=2\mathbb{Z}$ and $\mathfrak{p}_3=(0)$. Of course, we also have the filtration $0 \subseteq \mathbb{Z} \times 0 \subseteq \mathbb{Z}^2$, with $\mathfrak{p}_0=\mathfrak{p}_1=(0)$. This is I think the problem with taking an aribtrary filtration, as a module might admit a lot of weird filtrations. (This example is essentially from Vakil, Exercise 5.5.M.)
I don't know an exact reference for the trick you are mentioning, but something similar is as a hint in Exercise III.3.1 in Hartshorne. The basic idea here is that you have a sheaf $\mathscr{F}$ on $X$ supported on a closed subscheme $Y \subseteq X$ with ideal sheaf $\mathscr{I}$. The hint tells you to consider the filtration
$$ \mathscr{F} \supseteq \mathscr{I}\mathscr{F} \supseteq \mathscr{I}^2\mathscr{F} \supseteq \dots $$
As you can easily check, the quotients are supported in $Y$. So, it only remains to show that the fibration stops. (This might be tricky! Here is where the solution manual you linked uses that $\operatorname{Supp}\mathscr{F}$ is contained in $Y$.)
Edit: This seems to be discussed in the Stacks Project, in the proof of Lemma 30.12.3.
