I am a bit confused on the way Landau derives the Lagrangian of the free particle in SR (L. Landau, E. Lifshitz - The Classical Theory of Fields) and his conclusions about the equivalence between mass and energy.
He claims that there exists an integral that assumes its minimum value on the actual trajectory of the particle. Since the actual trajectory in space-time must be the same in every reference frame, this integral must be:
$ S = \alpha \int \mathrm{d}s $, where the integral is taken between two fixed points in space-time.
$\alpha$ is just a constant that can be found comparing this Lagrangian in the limit $c \to \infty $ to the classical one. It is found $\alpha = mc^2 $.
One can then express $\mathrm{d}s$ in an inertial reference frame. Collecting $\mathrm{d}t$ we get:
$$ S = - \int mc^2 \sqrt{1-\frac{v^2}{c^2}} \mathrm{d}t $$
Therefore, we conclude that, in an inertial reference frame, the Lagrangian is just:
$$L=- mc^2 \sqrt{1-\frac{v^2}{c^2}}$$
We can then derive the energy of a free particle with the formula we borrow from Classical Mechanics:
$$E=\sum_{i} \dot{q}_i \frac{\partial L}{\partial \dot{q}_i}-L$$
and we get:
$$E=\frac{mc^2}{\sqrt{1-v^2/c^2}}$$
He then claims that in SR this energy is NOT defined up to a constant, and therefore we can conclude that a mass at rest has an energy of $mc^2$. I do not understand why. After all, I can always add a constant $C$ to the Lagrangian. This would not change the equations of motion in this reference frame (because it is a total derivative of the function $Ct$). It wouldn't even change the equations of motion in any reference frame. This is because changing reference frame means putting $t=f(\textbf{x}', t')$, therefore $\mathrm{d}t=\mathrm{d}f=\frac{\mathrm{d}f}{\mathrm{d}t'}\mathrm{d}t' $. In the action integral, this would become
$$S' = \int \left( - mc^2 \mathrm{d}s + \frac{\mathrm{d}f}{\mathrm{d}t'}\mathrm{d}t' \right) $$
That does not change the equations of motion because $\frac{\mathrm{d}f}{\mathrm{d}t'} $ is a total derivative in time. Also, this term would change the energy in the non primed reference frame, making the energy:
$$E=\frac{mc^2}{\sqrt{1-v^2/c^2}}-C$$
which would prove that the energy is indeed defined up to a constant. What am I missing?