Fixed invalid use of $this within match closures.