Fixed #21462 -- Made `assertNumQueries` print executed queries on failure.