Fix ordering of appended templates.