Fix the ForMonad instance for CompileMonad. The old version lost track of
the state which could lead to variable name collision.