Fixing issue of localRequires using global context when they have a local context