Consider what happens in the back-end when a record gets loaded in a scriptable context:
1. Find all scripts and workflows deployed to the record
2. Load all applicable scripts and workflows into the runtime environment
3. For each applicable script, load all referenced modules into the runtime environment