Object passed by reference unexpectedly - C#