Given the lagrangian density written in the following form $$ \mathcal{L} \propto \frac{\mathcal{L}_{(EM)}^2}{R} $$ where $R$ stands for the Ricci tensor and $\mathcal{L}_{(EM)}$ stands for the usual electromagnetic matter lagrangian defined as $$ \mathcal{L}_{(EM)} = -\frac{F^2}{2}. $$
The field equation for $A_{\mu}$, using the Euler-Lagrange equation follows: $$ \frac{1}{4}\partial_{\lambda}\frac{\partial \mathcal{L}_{(EM)}^2}{\partial(\partial_{\lambda}A_{\rho})} = \frac{1}{4} \partial_{\lambda} \frac{\partial}{\partial(\partial_{\lambda}A_{\rho})} (F^{\mu \nu}F_{\mu \nu} F^{\alpha \beta}F_{\alpha \beta}) = \frac{1}{4} \partial_{\lambda} \left( \frac{\partial(F^{\mu \nu}F_{\mu \nu}) F^{\alpha \beta}F_{\alpha \beta}}{\partial(\partial_{\lambda}A_{\rho})} + F^{\mu \nu}F_{\mu \nu} \frac{\partial(F^{\alpha \beta}F_{\alpha \beta}) }{\partial(\partial_{\lambda}A_{\rho})} \right) $$ from the standard derivation of Maxwell's equation: $$ = \frac{1}{4} \partial_{\lambda} ( 4 F^{\lambda \rho} F^2 + 4 F^2 F^{\lambda \rho}) = 4 \partial_{\lambda} (F^{\lambda \rho} F^2) $$ therefore, the field equation is $$ \nabla_{\lambda} (F^{\lambda \rho} F^2) = 0. $$ (Where, clearly, the other term depending on $A_{\mu}$ in the Euler-Lagrange equation vanishes)
Is this procedure correct? What about the other Maxwell equation (that usually reads $\nabla_{[\alpha}F_{\beta \gamma]} = 0$)?