Fix Polyline::CalcTiltStep method and add corresponding test.