module loading additions: (1) support shared-programs-as-modules and (2) throw a proper error for a module loading failure