FIX: Alias modules that are required rather than imported (PR #8315)

Simply moving checkForAlias to occur for all methods of importing/requiring modules

GitHub

You’ve signed the CLA, markvanlan. Thank you! This pull request is ready for review.