Don't bind $this for closures in type handlers

Fixes issue #10.