[PATCH v2 6/8] d2d1: Use special vertex TYPE_END when last/first coincede