[ticket/17107] Fix PHP warning on legend output
This is a side issue revealed with the newly added viewonline functional test.
In current master branch group legend is being dumped to template with the
group helper->display_legend() method so plain LEGEND output is a leftover.