Move type-specific state into the query context structure.