Update: I have filed a bug report with Microsoft Connect, please vote for it!
Update 2: Microsoft have marked the bug report as fixed
To answer your last question you can add the MethodImpl
attribute with the option MethodImplOptions.NoInlining
to your IsGuid
method as an workaround to fix the problem.
I just made a simple test of switching between Debug and Release configuration for x86 on the .NET 4.0 and this seems to resolve the problem. I haven't yet run your runtests.bat though.
You should also submit an issue in Connect if one is not yet submitted and link it from your question.