Actually I guess the clarification doesn't really change my answer. If you keep re-starting your chain from the same position, this would violate the detailed balance condition:
Where $q$ is the proposal distribution and $\pi$ the target distribution. The reason being that $q(M_0|y)\pi(y)$ is now certainly not equal to $q(y|M_0)\pi(M_0)$. That is, since you always keep going back to $M_0$ at certain points in your chain regardless of your current state, the probability of this particular transition is completely unrelated to the probability of the transition in the opposite direction (which is essentially what you need for detailed balance).
More intuitively, your chain just wouldn't mix and explore $\pi$ properly because you keep restarting it from the same (arbitrary) starting point.
Memory shouldn't be a problem here since, if you want to compute an expectation on $w$, you only ever need to store one state of $S$ (the most recent sample), which presumably occupies no more memory than storing $M_0$.
Edit: I assumed you ultimately wanted to draw samples of $w$ and thereby approximate $p(w|D)=\int p(w|S)p(S|D)ds$, but with a bit more clarification it now seems that you want to calculate the probability of each possible value of $w$ with separate Gibbs samplings. Is there a special reason why you want to do it this way? The way I described above is more standard (and simple to implement).