Python meshpolyline intersection not working

Hi I am trying to figure out which faces in a planar mesh are intersected by a planar polyline (efficiently). Therefore I am using the rg.Intersect.Intersection.MeshPolyline() function from Python.

Unfortunately this function is not giving me the expected results. As you can see in the image, some of the faces are skipped. Is there anything I can do about this problem?

Hereby attached an example:
example.gh (10.9 KB)

Thank you for your time!