Different lookup depending on directive type.
Decouple sections and clauses export because they're separate now.
Merge pull request #1155 from reciprocity/feature/empty-section-export-patch

Clause export fix rebased to be patch
Merge branch 'release/0.9a25' into develop