/*
   * If either 'eval' or 'with' is used in a local scope, we must make sure
   * that all containing local scopes don't get munged. Otherwise, the
   * obfuscation would potentially introduce bugs.
   */
  private void protectScopeFromObfuscation(ScriptOrFnScope scope) {
    assert scope != null;

    if (scope == globalScope) {
      // The global scope does not get obfuscated,
      // so we don't need to worry about it...
      return;
    }

    // Find the highest local scope containing the specified scope.
    while (scope.getParentScope() != globalScope) {
      scope = scope.getParentScope();
    }

    assert scope.getParentScope() == globalScope;
    scope.preventMunging();
  }