Fix: correctly determine when an anonymous method should be static