File: src/com/google/javascript/jscomp/CommandLineRunner.java
Issue: Variable names prefixed with MSG_ cause error with advanced optimizations
Variables named something with MSG_ seem to cause problems with the module system, even if no modules are used in the code.

$ echo "var MSG_foo='bar'" | closure --compilation_level ADVANCED_OPTIMIZATIONS
stdin:1: ERROR - message not initialized using goog.getMsg
var MSG_foo='bar'
    ^

It works fine with msg_foo, MSG2_foo, etc.

Buggy code:
protected CompilerOptions createOptions() {
  CompilerOptions options = new CompilerOptions();
  if (flags.processJqueryPrimitives) {
    options.setCodingConvention(new JqueryCodingConvention());
  } else {
    options.setCodingConvention(new ClosureCodingConvention());
  }

  options.setExtraAnnotationNames(flags.extraAnnotationName);

  CompilationLevel level = flags.compilationLevel;
  level.setOptionsForCompilationLevel(options);

  if (flags.debug) {
    level.setDebugOptionsForCompilationLevel(options);
  }

  if (flags.useTypesForOptimization) {
    level.setTypeBasedOptimizationOptions(options);
  }

  if (flags.generateExports) {
    options.setGenerateExports(flags.generateExports);
  }

  WarningLevel wLevel = flags.warningLevel;
  wLevel.setOptionsForWarningLevel(options);
  for (FormattingOption formattingOption : flags.formatting) {
    formattingOption.applyToOptions(options);
  }

  options.closurePass = flags.processClosurePrimitives;

  options.jqueryPass = CompilationLevel.ADVANCED_OPTIMIZATIONS == level &&
      flags.processJqueryPrimitives;

  options.angularPass = flags.angularPass;

  if (!flags.translationsFile.isEmpty()) {
    try {
      options.messageBundle = new XtbMessageBundle(
          new FileInputStream(flags.translationsFile),
          flags.translationsProject);
    } catch (IOException e) {
      throw new RuntimeException("Reading XTB file", e);
    }
  } else if (CompilationLevel.ADVANCED_OPTIMIZATIONS == level) {
    // In SIMPLE or WHITESPACE mode, if the user hasn't specified a
    // translations file, they might reasonably try to write their own
    // implementation of goog.getMsg that makes the substitution at
    // run-time.
    //
    // In ADVANCED mode, goog.getMsg is going to be renamed anyway,
    // so we might as well inline it. But shut off the i18n warnings,
    // because the user didn't really ask for i18n.
    options.messageBundle = new EmptyMessageBundle();
  }

  return options;
}

Fixed code:
protected CompilerOptions createOptions() {
  CompilerOptions options = new CompilerOptions();
  if (flags.processJqueryPrimitives) {
    options.setCodingConvention(new JqueryCodingConvention());
  } else {
    options.setCodingConvention(new ClosureCodingConvention());
  }

  options.setExtraAnnotationNames(flags.extraAnnotationName);

  CompilationLevel level = flags.compilationLevel;
  level.setOptionsForCompilationLevel(options);

  if (flags.debug) {
    level.setDebugOptionsForCompilationLevel(options);
  }

  if (flags.useTypesForOptimization) {
    level.setTypeBasedOptimizationOptions(options);
  }

  if (flags.generateExports) {
    options.setGenerateExports(flags.generateExports);
  }

  WarningLevel wLevel = flags.warningLevel;
  wLevel.setOptionsForWarningLevel(options);
  for (FormattingOption formattingOption : flags.formatting) {
    formattingOption.applyToOptions(options);
  }

  options.closurePass = flags.processClosurePrimitives;

  options.jqueryPass = CompilationLevel.ADVANCED_OPTIMIZATIONS == level &&
      flags.processJqueryPrimitives;

  options.angularPass = flags.angularPass;

  if (!flags.translationsFile.isEmpty()) {
    try {
      options.messageBundle = new XtbMessageBundle(
          new FileInputStream(flags.translationsFile),
          flags.translationsProject);
    } catch (IOException e) {
      throw new RuntimeException("Reading XTB file", e);
    }
  } else if (CompilationLevel.ADVANCED_OPTIMIZATIONS == level) {
    // In SIMPLE or WHITESPACE mode, if the user hasn't specified a
    // translations file, they might reasonably try to write their own
    // implementation of goog.getMsg that makes the substitution at
    // run-time.
    //
    // In ADVANCED mode, goog.getMsg is going to be renamed anyway,
    // so we might as well inline it. But shut off the i18n warnings,
    // because the user didn't really ask for i18n.
    options.messageBundle = new EmptyMessageBundle();
    options.setWarningLevel(JsMessageVisitor.MSG_CONVENTIONS, CheckLevel.OFF);
  }

  return options;
}