Thinking about this problem, and expanding the Lagrangian equation for theta, the RHS is cyclic while the LHS is not. I'm convinced this can only happen if both sides are constant, and this constant can only be zero, since the RHS is zero for theta = pi/2