I'm puzzling over the canonical derivation of GR from the Einstein-Hilbert action; getting the derivation to gel with an explicit treatment of the functional derivative isn't working out. So the derivation (drawn here from Wikipedia, though other literature is similar) begins,
$$ I = \int{\sqrt{-g}d^4x} \left[\frac{1}{2 \kappa}R + \mathcal{L}\right] $$
and immediately proceeds to
$$ \delta I = 0 =\int d^4x \delta g_{\mu \nu}\left[\frac{1}{2\kappa}\frac{\delta\left(\sqrt{-g}R\right)}{\delta g_{\mu \nu}}+\frac{\delta\left(\sqrt{-g}\mathcal{L}\right)}{\delta g_{\mu \nu}}\right]. $$
But the Ricci scalar depends on the first and second derivatives of the metric tensor, so why do we not have factors
$$ \delta g_{\mu \nu, \alpha}~, \qquad \delta g_{\mu \nu,\alpha \beta}~, $$
against which we vary as well? Maybe there is some identity that in this case causes these terms to vanish, but I don't see it.