diff --git a/java/src/com/google/template/soy/passes/ContentSecurityPolicyNonceInjectionPass.java b/java/src/com/google/template/soy/passes/ContentSecurityPolicyNonceInjectionPass.java
index <HASH>..<HASH> 100644
--- a/java/src/com/google/template/soy/passes/ContentSecurityPolicyNonceInjectionPass.java
+++ b/java/src/com/google/template/soy/passes/ContentSecurityPolicyNonceInjectionPass.java
@@ -112,7 +112,7 @@ public final class ContentSecurityPolicyNonceInjectionPass extends CompilerFileP
             openTag
                 .getSourceLocation()
                 .getEndPoint()
-                .offset(0, openTag.isSelfClosing() ? 2 : -1)
+                .offset(0, openTag.isSelfClosing() ? -2 : -1)
                 .asLocation(openTag.getSourceLocation().getFilePath());
         openTag.addChild(createCspInjection(insertionLocation, nodeIdGen));
       }
Fix a source location error in CspNonceInjection.

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