stable order for generic type instances