My proposed solution behaves as though you had written
{ \include "MyFile.ly" }
rather than the desired
\include "MyFile.ly"
Lots of simple debugging code works fine, but in the usual case where
MyFile.ly is full of variable definitions, those definitions are not
parsed in the outermost level, and they get syntactic errors.
I have been hunting, so far in vain, for the code implementing
\include,
in the hope that I can tweak that code to get the right behavior.
A general way of switching to the outermost parsing layer would also
possibly solve the problem, but I can't find that either. Still
hunting,
and of course ready to take any hint.