[CSharpBinding] Fixed foreach loop variable reference usage.