Fix formspecs mixing up with the console

Actually; if you try to "open" a formspec with the console opened, it will glitch and "mess up" (having to exit the formspec, and press f10 for "enabling" the console other time, then press it other time for closing it properly)

This makes the console "close" when a formspec is going to be opened.