Fix polyline flickering and vertex expansion at end points.