EZP-21052: Fixed wrong usage of $this inside a closure with PHP 5.3