Port fix for Leaflet issue #1919