Fix regression in stats API endpoint Upstream-commit: 4389fc8bf975a5df567c8431dda82d19a09733a3 Component: engine