vanilla/vanilla — pull request #2169 by imnotjames (2014-10-11 10:55:02+00:00)
Title: Don't use $this in anonymous function

The $this variable wasn't allowed in anonymous functions until 5.4;
Mitigate this by using a $context variable and passing it into the scope.

I looked and it seemed like this was the only occurence of the problem throughout the codebase.

Fixes #2143 from what I can see.

@myevit can you verify this fixes your issue?