In case this throws you off: this is reintroduced a few lines below. I just switched the two if statements and put this inside the if statement so that it doesn't need to be executed unless we actually do have a core module (even if it's cheap).