VIVO-533 Simplify the code in the template loader.
Merge branch 'maint-rel-1.6' into develop