fix handling of situations in grid where a single event covers more than one gap