Issue #125: Advanced templates don't work for empty files with no directives