Don't use `$this` in a closure.

It doesn't work in PHP 5.3, and that's what we currently support.