Fixed regression in ingest stats query