Ensure that variables and functions are also available in blocks of code

View variables will be remapped anywhere they appear in the template, but
are only automatically escaped if output with the <?= short tags.

Also implemented tests for access to protected and public properties
and class methods.