Pulse can run PHP scripts usually without needing to do this.
You can add it as a tag:
As long as it's running through the template.php file it should work.
So as you've done is great, but you could even just add it to the template.php like the navigation block?
That said, if not, maybe sharing the URL and any info could allow people to help with the issue.