Hey Peter,
Tell-by-reference NEVER works – UNLESS the AppleScript terminology you're using is universally available.
The reason we have tell-blocks to begin with is to make that terminology available to the script.
This happens at compile-time – NOT run-time.
There are a variety of workarounds, but nothing is all that neat and clean.
Probably your best bet is to use InDesign's application id like so:
tell application id "com.adobe.InDesign"
-- rest of code here
end tell
This should talk to the running version of the application.
If that doesn't work report back, and we'll investigate a bit more.
-Chris