This method: https://github.com/xamarin/md-addins/blob/9a381a845694bffc417acd307a22ad43bc3fcc9f/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner/LayoutInfo.cs#L198-L208
Produces this mdbdump.exe output: https://gist.github.com/DavidKarlas/9c4c970c2f8ba8be6302fda8575e9895
It seems to me that "problem" variable should have scope_ref="3" and "itemData" variable should have scope_ref="4"
This is maybe related to missing il_index="3"?
This is by design scope_ref="1" means scope with index 2
I'm now confident this is mcs.exe bug. I have new sample: https://gist.github.com/DavidKarlas/b3e2cef574d390253bee554c2e3c55a6
"item2" variable is totally off. Either with index=4 or index=5. Also there is way too many scopes.
Fixed in master and Mono 4.8
Place breakpoints on all Console.WriteLine() lines and inspect values of item1 and item2 are correct.