Fix to swallow BOMs in sourced files

Fixes #1518