Yes, that was the entire problem! So simple.
I simply started all files as blank so just inserted my contents after what I thought was the "heading". It now makes sense that there is a line inserted above the local variables when you create a file.
Hopefully someone else can learn from my simple error.
There is a single sentence in section 5.2 of the doumentation that addresses this:
"You can also insert the file variable yourself, by putting the following text at the end of your files..."
Perhaps this could be made more explicit that this *has* to be at the end of the file for it to work?