Fix scoped query stub.