C#: Don't choke on locals in VS2012 (Fixes #9)

Includes test case.

Also fixes test cases for CSharp12Resolver.