allow $this as argument on static methods and functions #3940