There was a (ReSharper) warning about "Access to foreach variable in closure. May have different behaviour when compiled with different versions of compiler." But it should not matter in this case though. I can change it back.