Changed from using the current module scope to the innermost active scope