qapi: Move context-free checking to the proper place