Thank you, both, for confirming this for me.
I suppose the main idea of script libraries is to facilitate reusable scripts, in which case it makes no sense to be using ids of specific objects within the script library. This is another situation where I need to change the way I think about how to connect the various design elements.
A big part of the problem in this case is that I tend to go straight for the script library design element as I hate writing script into the design page which only ends up using about a quarter of the screen. I need to think more about the correct way to do this from a coding point of view, rather than from my preferences in using the IDE!
Emily.