Pass the polyline's context to the off function so the events will be removed in the latest leaflet build