The short answer is that at this point in Ref. 1 $u^m$ are new independent variables; not functions of $q$ and $p$. Equivalently, $u^m$ are [Lagrange undetermined multipliers](https://en.wikipedia.org/wiki/Lagrange_multiplier). It is possibly helpful to mention that a field redefinition $u^m\to u^m +U^m(q,p)$ is allowed. References: 1. M. Henneaux & C. Teitelboim, _Quantization of Gauge Systems,_ 1994; subsection 1.1.4: eqs. (1.12) + (1.13). 2. P.A.M. Dirac, _Lectures on QM,_ 1964; eqs. (1-7)+ (1-8).