Fix broken stat test
Merge branch 'stat-test-fix'

Review by SLF, many thanks Russell!