[ticket/11323] Correctly treat variables in template defines

Previously, any template variables that were used when defining a variable
were treated as strings. This is a regression to phpBB 3.0. With this
patch the template variables will be properly parsed.

Ticket: http://tracker.phpbb.com/browse/PHPBB3-11323

PHPBB3-11323