(Warning: I'm a student of mathematics with no training in physics.)

In derivations of the Dirac equation from an action principle, one encounters the action $$S= \displaystyle\int\,d^4x \,\bar\psi(x)(i\gamma^{\alpha}\partial_{\alpha}-m)\psi(x)$$ where $\psi(x)$ is the Dirac field and $\bar\psi=\psi^{\dagger}\gamma^0$ is the Dirac adjoint. (See pages 88 and 89 of http://www.damtp.cam.ac.uk/user/tong/qft/four.pdf for these equations.)

Looking at this action, it seems to depend on one variable, namely $\psi$. But every reference I've ever looked at that derives the Dirac equation from the action says something like, "Treat $\bar\psi$ as an independent variable and vary with respect to it to obtain the Dirac equation." (See Page 90 of the reference above for example.) But this seems ridiculous to me; the very definition of $\bar\psi$ shows that it depends on $\psi$! Why could one not then, in any context, take any field equation one wants, multiply by some independent variable which makes the action a scalar, and then vary with respect to this variable to re-obtain the field equation? I have some vague idea about why my reasoning is not valid, but I'd like to hear why it's wrong from some folks who are more educated in physics than I, and why the reasoning is correct in the case of deriving the Dirac equation.