In some posts (in the comments of the answer to this post, in the answer to this post and in the comments to this post) people used the argument that
a stochastic process $X$ which is a local martingale (i.e. there is a localizing sequence $T_n$ s.t. $X^{T_n}$ is a uniformly integrable martingale) and locally a square integrable process (i.e. there is another localizing sequence $S_n$ s.t. $\forall t\geq0: \mathbb E (X_t^{S_n})^2<\infty$) is locally a square integrable martingale (i.e. there is localizing sequence $R_n$ s.t. $X^{R_n}$ is a martingale and $\forall t\geq0: \mathbb E (X_t^{R_n})^2<\infty$).
But none of them could give an propper answer to the question how this can be proofed. I understand all of their proofs except of the part they always skipped: why the processes $X^{T_n\land S_n}$ or $X^{T_n\land S_n\land n}$ should be still square integrable. I think square integrability is not stable under stopping.
I think a lot of people are confused if this detail is not clearly distinguished, what might have caused for example this post. This is the reason why I want to clear this question once and for all:
Can anyone either give a propper proof that a locally square integrable local martingale (i.e. there are localizing sequences $T_n, S_n$ s.t. $X^{T_n}$ is a uniformly integrable martingale and $\forall t\geq0: \mathbb E (X_t^{S_n})^2<\infty$) is locally a square integrable martingale (i.e. there is localizing sequence $R_n$ s.t. $X^{R_n}$ is a martingale and $\forall t\geq0: \mathbb E (X_t^{R_n})^2<\infty$), or give a counterexample which is a local martingale and a locally square integrable process, but not locally a square integrable martingale.
If you give a proof of the first I'm especially (and actually only) interested in the part why square integrability is stable under stopping.