Bug fix: Using $this in static context