Fix in hoping to address the issues regarding some edge cases of remove redundant variables in relation with functions.

https://bugzilla.xamarin.com/show_bug.cgi?id=11492