Make sure overridden templates are actually used
Add test case for template overrides in sortlink tag
PEP8 fixes
Make flake8 ignore E128