refresh_stats: Do not break when checking last_submission in a fresh store

Fixes #3230