Fix bug where sections got destroyed too early.
Merge branch 'destroy-section-fix'