fixed removal of PHP closing tags for templates

In a PHP template, we don't want to remove closing PHP tags.