Named function magically turns into anonymous method for no clear reason, cannot be used as Action - C#