Let $X$ be a module over some ring which splits as $$X\cong M_1\oplus S_1\cong M_1\oplus M_2 \oplus S_2 \cong M_1\oplus M_2 \oplus M_3\oplus S_3\cong \ldots$$ where the isomorphisms come from splittings $S_i\cong M_{i+1}\oplus S_{i+1}$.
Let $S=\bigcap S_i$ and $M=\sum M_i$. There is a canonical injection $M\oplus S\rightarrow X$ which is compatible with the projections to $S_i$ and $M_i$ in all of the above splittings.
Question: Is this an isomorphism, i. e. is $X\cong M\oplus S$?
If the answer is "no", I would additionally be interested in some 'conceptual' way to 'measure' the failure of this being an isomorphism.