Only do semantic checking on query cache miss