I've been reading Straumann's book "General Relativity & Relativistic Astrophysics". In it, he claims that the twice contracted Bianchi identity: $$\nabla_{\mu}G^{\mu\nu}=0$$ (where $G^{\mu\nu}=R^{\mu\nu}-\frac{1}{2}g^{\mu\nu}R$) is a consequence of the diffeomorphism (diff) invariance of the Einstein-Hilbert (EH) action. Now, I can show (I think) that the EH action is diff invariant, by considering a infinitesimal diff, generated by a vector field $X$: $$\delta_{X}S_{EH}=\phi^{\ast}S_{EH}-S_{EH}=\int_{M}\mathcal{L}_{X}\left(d^{4}x\sqrt{-g}R\right)=\int_{M}\left[\mathcal{L}_{X}\left(d^{4}x\sqrt{-g}\right)R +d^{4}x\sqrt{-g}\mathcal{L}_{X}\left(R\right)\right]\\ \qquad\qquad\qquad\quad\;\;=\int_{M}d^{4}x\sqrt{-g}\left[\nabla_{\mu}X^{\mu}R+X^{\mu}\nabla_{\mu}R\right]=\int_{M}d^{4}x\sqrt{-g}\,\nabla_{\mu}\left(X^{\mu}R\right)\\ =\int_{\partial M}d^{3}x\sqrt{h}\,n_{\mu}X^{\mu}R=0\;\;\qquad\qquad\qquad\quad$$ where $h_{ij}$ is the induced metric on the boundary $\partial M$ of the manifold $M$, with $n^{\mu}$ the normal vector to the boundary. The last equality follows upon the assumption that $X^{\mu}$ has compact support in $M$.
However, I'm unsure how one uses this fact to derive the (twice-contracted) Bianchi identity?
Straumann simply writes: $$\delta S=\int_{M}d^{4}x\sqrt{-g}\left(\frac{1}{\sqrt{-g}}\frac{\delta S_{EH}}{\delta g^{\mu\nu}}\right)\delta g^{\mu\nu}=\int_{M}d^{4}x\sqrt{-g}\,G_{\mu\nu}\delta g^{\mu\nu}=-\int_{M}d^{4}x\sqrt{-g}\,G^{\mu\nu}\delta g_{\mu\nu}$$ and notes that for an infinitesimal diff (generated by some vector field $X$), $\delta g_{\mu\nu}=2\nabla_{(\mu}X_{\nu)}$, such that $$\delta_{X} S=-2\int_{M}d^{4}x\sqrt{-g}\,G^{\mu\nu}\nabla_{\mu}X_{\nu}=2\int_{M}d^{4}x\sqrt{-g}\,X_{\nu}\nabla_{\mu}G^{\mu\nu}=0$$ and so, since $X^{\nu}$ is arbitrary, it must be that $\nabla_{\mu}G^{\mu\nu}=0$.
What confuses me about this, is that one neglects the effect of the Lie derivative on $d^{4}x$ in this case (in the proof that the EH action is diff invariant, it was taken into account). Is the point that an infinitesimal diff is carried out in the same coordinate chart, and so $d^{4}x$ doesn't change in this case?