Linecast on Recast graph with Links. Exception!

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List1[UnityEngine.Vector3].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633) Pathfinding.NavmeshBase.Linecast (INavmesh graph, Vector3 tmp_origin, Vector3 tmp_end, Pathfinding.GraphNode hint, Pathfinding.GraphHitInfo& hit, System.Collections.Generic.List1 trace) (at Assets/AstarPathfindingProject/Generators/NavmeshBase.cs:1036)
Pathfinding.NavmeshBase.Linecast (Vector3 origin, Vector3 end, Pathfinding.GraphNode hint, Pathfinding.GraphHitInfo& hit, System.Collections.Generic.List`1 trace) (at Assets/AstarPathfindingProject/Generators/NavmeshBase.cs:942)

This happened when I have done Linecast on Recast graph with some nodes connected by links.
To be more precise, I have created a bridge like structure that units can walk over and under.

Over the bridge and under it I have used rectangular NavMeshCut and connected this areas with a bunch of one directional NodeLinks to allow my units to drop down the bridge. All was fine until I had to check some straight paths with a Linecast involving this Links/Areas. There is no problem when I use it somewhere else or when I don’t use Links.

Ah. Yes that indeed looks like a bug.

I think the issue stems from an incorrect return value in the GetPortal method. It would only happen if the two nodes were in different tiles, but were still connected while not sharing an edge.

Here is a diff of the required fix (I think).
If you find the TriangleMeshNode.GetPortal method, go to the bottom and add that ‘return true’ line and change the ‘return true’ line at the bottom of the method to ‘return false’. Let me know if this fixes the bug.