CMS-3350 Use generic source classes in scripting code. Fixed ModuleKeyResolver so that it throws exception istead of null when not found.