sort tags on import according to canonical tag order, closes #170