My textbook derives the rocket equation from conservation of momentum like so:
$$\begin{align}p_i&=p_f \tag{1}\\ mv&={(m-dm_g)}{(v+dv)}+dm_g(v-u)\\ mv&=mv+m\,dv-dm_g\,v-dm_g\,dv+dm_g\,v-dm_g\,u\\ m\,dv &=dm_g\,dv+dm_g\,u\end{align}$$
Here $dm_g$ is the instantaneous change in the amount of fuel expelled, and therefore $dm_g= -dm$, the change in the rocket's mass. The textbook says to discard the $dm_g dv$ term, so we have
$$m\,dv = - u\,dm \tag{2}$$
Taking $m$ as a a function of time, we can then solve for $\Delta v$:
$$\begin{align} \int_{v_0}^{v_1} dv &= -u \int_{m_0}^{m_1} \frac{dm}{m} \\ v_1 - v_0 = \Delta v &= u \ln\left(\frac{m_0}{m_1}\right) \end{align}$$
where $m_1$ is the final mass of the rocket after expelling $-\Delta m$ units of fuel.
My question has to do with the connection between (1) and (2). On the left side of (2), we have $m\, dv$, which derives from the expression $(m-dm_g)(v+dv)$ in (1). In this expression, $m$ represents the initial mass of the rocket-fuel system (hence we subtract $dm_g$ to get the instantaneous mass). Likewise, in (2) it seems to me like $m$ should refer to the rocket's initial mass $m_0$, not its changing mass as a function of time.
Then (2) instead reads
$$m_0\,dv = - u\,dm \tag{2}$$
and simply
$$\Delta v = -u \left(\frac{m_1 - m_0}{m_0}\right)$$
What's wrong here?
I'd prefer answers that clarify the proof in question, rather than providing alternative proofs from Newton's law.