Make sure tags are in alphabetical order in the view template

Fixes #242