Fixes #930: Add support for self and $this
Merge pull request #1261 from mvriel/feature/930

Fixes #930: Add support for self and $this