Okay, when this error occurred, I outputted the mouse poly, the line segment, and the endpoint to test. I've tested several of them, but I'll just demonstrate one here since the results are always the same outcome:

Output:
Point: -26 78 Segment: -26 78 48 68 ( -66,58,-26,58,-26,98,-66,98 )

Poly Broken Down to Linsegs:
-66,58,-26,58
-26,58,-26,98
-26,98,-66,98
-66,98,-66,58

stepping through the mouse poly against the linesegment, the second linesegment was the one found intersecting.

echo -a $intersect(-26,78,48,68,-26,58,-26,98,ll)
Output: -26 78 (just so happens to return the same point as our endpoint! more proof it's on the lineseg.)

now we take this linesegment, and our endpoint (not the one from $intersect() although they're both the same here) and follow our equasion and solve it:
Ax + By + C = 0
(y1 y2)x + (x2 x1)y + (x1y2 x2y1) = 0

//tokenize 32 -26 58 -26 98 | var %x = -26 , %y = 78 | echo -a $calc(($2 - $4) * %x + ($3 - $1) * %y + ($1 * $4 - $3 * $2))

Output:
0

Let's shift X by a bit and show what happens with the line test:

//tokenize 32 -26 58 -26 98 | var %x = -26.000001 , %y = 78 | echo -a $calc(($2 - $4) * %x + ($3 - $1) * %y + ($1 * $4 - $3 * $2))

Output:
0.00004 (Not truely on the line)

This point truely is on the linesegment. it's return was 0, not some positive or negative number.

This means it is part of our polygon surface, yet $inpoly() returns false.

//echo -a $inpoly(-26,78,-66,58,-26,58,-26,98,-66,98)
Output:
$false

$onpoly() proved they overlap.

$intersect() proved that one of the mousepoly linesegments intersect with the linesegment from the other polygon, and returned an intersection point identical to the one wer're testing.

Using the line equasion, we proved that the point is truely 100% on the linesegment, not left or right of it.

$inpoly() failed.