Single state saver.
It's always okay to save template_depth and min_section_level because they only change at template calls, and template calls are always cleanly nested.
template_depth
min_section_level