Revert "Merge a long forgotten commit that improves how headers are included"

This reverts commit 06e299e75be94671a6cfc6da57956dc1d3829ad8, reversing
changes made to d7d6a5ef223d098d7df6db942f25a5526c226c45.