diff --git a/src/com/google/javascript/jscomp/J2clClinitPrunerPass.java b/src/com/google/javascript/jscomp/J2clClinitPrunerPass.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/J2clClinitPrunerPass.java
+++ b/src/com/google/javascript/jscomp/J2clClinitPrunerPass.java
@@ -406,7 +406,12 @@ public class J2clClinitPrunerPass implements CompilerPass {
       }
 
       Node lhs = node.getFirstFirstChild();
+      if (lhs.isGetElem()) {
+        // This can happen if code has been inserted, for example for instrumentation.
+        return false;
+      }
       checkState(lhs.isName() || lhs.isGetProp(), lhs);
+
       Node rhs = node.getFirstChild().getLastChild();
       return NodeUtil.isEmptyFunctionExpression(rhs)
           && Objects.equals(NodeUtil.getBestLValueName(lhs), enclosingFnName);
Adds consideration for GETELEMs when analyzing the body of a clinit method in `J2clClinitPrunerPass`.

The possibility of GETELEMs had been overlooked due to the generated nature of the code. However they can appear if other passes have inserted code, such as for instrumentation.

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