Stephane makes me remark that the introduction of auxiliary variables create problems for people who use Matlab syntax in Dynare and rely on global such as M_.endo_nbr It is important that we define clearly the position of auxiliary variables in the vectors of variables and that we commit to it. We had decided, to put auxiliary variables after all variables declared explicitly in the model. We can add that the Lagrange multipliers added by ramsey_policy will be added after the auxiliary variables.
All the best,
Michel