Cache stats when regenerating, greatly improving performance.
Rename `kb_regen_stats` to `regen_stats`.