Fix GH-32 as well by checking $this in non-static context only.