Reif's Fundamentals of Statistical and Thermal Physics, pages 627-628, presents Liouville's theorem. I do not understand the punchline. Starting with Hamilton's equations, they derive
$$\frac{\partial\rho}{\partial t}=-\sum_{i=1}^f\left(\frac{\partial\rho}{\partial q_i}\dot{q_i}+\frac{\partial\rho}{\partial p_i}\dot{p_i}\right)$$
where $\rho$ is the density of systems in phase space, f is the degrees of freedom and q and p are the canonical coordinates.
and from there
$$\frac{\partial\rho}{\partial t}=-\sum\left(\frac{\partial\rho}{\partial q_i}\frac{\partial H}{\partial p_i}-\frac{\partial\rho}{\partial p_i}\frac{\partial H}{\partial q_i}\right).$$
I'm fine with that. Then they go on to say
"Suppose that at any give time... the systems are uniformly distributed over all of phase space. Or, more generally, suppose that $\rho$ is at time $t$ only a function of the energy $E$ of the system, this energy being a constant of the motion.
Then
$\frac{\partial \rho}{\partial q_i}=\frac{\partial\rho}{\partial E}\frac{\partial E}{\partial q_i}=0$
I am unable to understand why this follows from the italicized supposition. For example, couldn't we have $E=\frac{p^2}{2m}+\frac{1}{2}kq^2$ and $\frac{\partial E}{\partial q}\ne0$?