Fix columns not fetched when using stats output.

Fixes #5015