The following case gives an intersection result in which one grid cell is listed twice in the results, each containing part of the original polygon (red dashed line). I think you would want the intersection result to have one entry per grid cell. I will submit a PR with a fix.

The following case gives an intersection result in which one grid cell is listed twice in the results, each containing part of the original polygon (red dashed line). I think you would want the intersection result to have one entry per grid cell. I will submit a PR with a fix.