Fix contour layer drawing fails when the map extent do not overlap with the source data (#4753)