Optimization of vertices did not work properly

There was a mistake between len(self.indices) and len(self.vertices) that
make vertice check fails when indices list is longer than vertices list,
resulting id duplicate vertices.