Mean value theorem for holomorphic functions

The mean value theorem for holomorphic functions states that if $f$ is analytic in $D$ and $a \in D$, then $f(a)$ equals the integral around any circle centered at $a$ divided by $2\pi$. But if $f$ is analytic, then the line integral around any closed curve is 0, so $f(a) = 0$. Why does the MVT not result in all holomorphic functions being identically zero? There must be something I'm missing here.


The difference is that for the mean value property, we consider the integral with the measure/form $d\varphi$, and for the integral theorem, the measure/form is $dz$.

The mean value property is actually the Cauchy integral formula for the centre of a disk:

$$\begin{align} f(a) &= \frac{1}{2\pi i} \int_{\lvert z-a\rvert = r} \frac{f(z)}{z-a}\,dz\\ &= \frac{1}{2\pi i} \int_0^{2\pi} \frac{f(a+re^{i\varphi})}{(a+re^{i\varphi})-a}\, d(a+re^{i\varphi})\\ &= \frac{1}{2\pi i} \int_0^{2\pi} \frac{f(a+re^{i\varphi})}{re^{i\varphi}}rie^{i\varphi}\,d\varphi\\ &= \frac{1}{2\pi} \int_0^{2\pi} f(a+re^{i\varphi})\,d\varphi. \end{align}$$

For a parametrised circle with centre $a$, we have $d\varphi = \dfrac{dz}{i(z-a)}$, so the integral of $d\varphi$ over a circle does not vanish, while the integral of $dz$ does.