The last two terms are a linear combination of the Gaussian constraints and we have a whole family of (gauge equivalent)Hamiltonians parametrized by f. In fact, since the last three terms vanish for the constrained states, we may drop them.