On top of being allowed at the start of files, directives (script, notify, since, import) are currently allowed at the start of any "block" (something that starts with a { and ends with a }, other than array literals).
I believe this to be a bug/unintended behaviour, and here's why:
script &...