Fixed detection of multiple contour edge points during casting.