Fix crash when two points are equal, from Andrés Troya.