Thanks to a response over on RemObject Connect beta forum I have a solution. (For post see http://connect.remobjects.com/discussion/comment/13540#Comment_13540)
Thanks go to poster vovanl.
I had to import my functions via the OnExecImport event as follows:
...
FPascalScript.OnExecImport := OnExecImport;
FPascalScript.SetCompiled(sCompiledScript);
...
TMyClass.OnExecImport(Sender: TObject; se: TPSExec; x: TPSRuntimeClassImporter);
begin
se.RegisterDelphiFunction(@Value_TeamCode, 'Value_TeamCode', cdRegister);
end;
...
It appears SetCompiled clears all existing registrations and so you MUST hook OnExecImport to re-register functions, procedures, methods etc.
Note that it appears loading pre compiled script (ie changing out one script for another) does appear to add some extra time overhead. I have found my initial work around is in fact faster by around 6 times.