Another bug found by @amente

Unmatched section tags will have cryptic error messages. Improved now.