Fix a continuous local martingale $M$ starting at $0$. Suppose $X \in \mathscr{P}^*(M)$, i.e. $X$ is progressively measurable and $\int_0^tX_u^2 d\langle M \rangle_u<\infty$ a.s. Then suppose $Z$ is $\mathscr{F}_0$-measurable (we are NOT assuming $\mathscr{F}_0$ is trivial, so $Z$ does not necessarily have to be constant). How do I show that $$ \int_0^t Z X_udM_u = Z \int_0^t X_u dM_u. $$
What I have tried so far: If $X$ simple and $M$ is a martingale, then the result is immediate by definition using sums (all we need to note is that $ZX_u$ will still be progressive since $Z$ is known at time $0$). If $Z$ is bounded then taking simple $X^{(n)} \to X$ (in the sense of $E \int_0^t|X_u^{(n)}-X_u|^2d\langle M \rangle_u \to 0$) we also have $Z X^{(n)} \to Z X$, which gives the result for $Z$ bounded and $M$ a martingale. By taking a localizing sequence we may easily extend this to $Z$ bounded and $M$ a local martingale.
Both sides of the proposed equality make sense without assuming any extra assumptions on $Z$, but if $Z$ blows up in $\omega$, a localizing sequence $\tau_n$ for $X$ may not be a localizing sequence for $ZX$, and we do not necessarily have $ZX^{(n)} \to ZX$ in the sense $L^2(P,\langle M\rangle)$ above. Intuitively this doesn't matter, but I don't know how to show it.
How can I get rid of this requirement that $Z$ be bounded? Maybe there is a more direct way to do this without resorting to simple functions?