mono/mono — pull request #445 by martinpotter (2012-08-26 19:36:13+00:00)
Title: Capturing more local variables in iterator/async context.

If the block in which the variable is declared contains a yield/await, capture the variable as it may be assigned and/or used in child block that do not contain yield/await. Previously, if the variable was assigned in a child block that did not contain a yield/await and subsequently used in a child block after a yield/await that also did not contain a yield/await, the variable would be treated as local to the MoveNext method, having it's value reset on each call to MoveNext. This fixes bug #6587.