diff --git a/src/com/google/javascript/jscomp/NodeUtil.java b/src/com/google/javascript/jscomp/NodeUtil.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/NodeUtil.java
+++ b/src/com/google/javascript/jscomp/NodeUtil.java
@@ -2546,7 +2546,7 @@ public final class NodeUtil {
   static final Predicate<Node> createsScope = new Predicate<Node>() {
     @Override
     public boolean apply(Node n) {
-      return createsBlockScope(n) || n.isFunction()
+      return createsBlockScope(n) || n.isFunction() || n.isModuleBody()
           // The ROOT nodes that are the root of the externs tree or main JS tree do not
           // create scopes. The parent of those two, which is the root of the entire AST and
           // therefore has no parent, is the only ROOT node that creates a scope.
Small correction: Module bodies are also scope roots.

-------------
Created by MOE: <URL>