diff --git a/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java b/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java index 8b1b63964..a9fec423d 100644 --- a/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java +++ b/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java @@ -1917,8 +1917,8 @@ public static ParseTree compile(TokenStream stream, Environment environment, processLateKeywords(tree, environment, compilerErrors); checkLinearComponents(tree, environment, compilerErrors); postParseRewrite(rootNode, environment, envs, compilerErrors, true); // Pass rootNode since this might rewrite 'tree'. - moveNodeModifiersOffSyntheticNodes(tree); tree = rootNode.getChildAt(0); + moveNodeModifiersOffSyntheticNodes(tree); staticAnalysis.analyze(tree, environment, envs, compilerErrors); optimize(tree, environment, envs, procs, compilerErrors); link(tree, compilerErrors);