        }
        return true;
      }
-@@ -251,35 +239,23 @@ class AnalyzePrototypeProperties implements CompilerPass {
+@@ -251,35 +238,23 @@ class AnalyzePrototypeProperties implements CompilerPass {
        if (n.isGetProp()) {
          String propName = n.getFirstChild().getNext().getString();
  

 
     /**
      * Determines whether {@code n} is the FUNCTION node in a global function
@@ -363,22 +336,24 @@ class AnalyzePrototypeProperties implements CompilerPass {
     private boolean isGlobalFunctionDeclaration(NodeTraversal t, Node n) {
       // Make sure we're either in the global scope, or the function
       // we're looking at is the root of the current local scope.

+      if (n != null && NodeUtil.isVarOrSimpleAssignLhs(n, assign)
+          && n.isGetProp()
+          && assign.getParent().isExprResult()) {
+        boolean isChainedProperty =
+            n.getFirstChild().isGetProp();
 
     /**
      * Returns the name of a prototype property being assigned to this r-value.
@@ -387,32 +360,18 @@ class AnalyzePrototypeProperties implements CompilerPass {
      * the R-value is used in multiple expressions (i.e., if there's
      * a prototype property assignment in a more complex expression).
      */
