Weird GetContour behaviour

I’m using the GetContours solution from GraphUtilities to draw outlines of allowed move in a grid. But when there’s a single blocking node within the area I run GetContours for, this happens:

When the single blocking node is outside of the outline, it works as intended:

Except the yellow outline does the same here too.

Any idea why this happens?

I never managed to fix this one. Here’s a screenshot with some more debug info though:

The magenta nodes are those that are sent to GetContour, the green ones are the vertices I get back. This only ever happens when there’s a single-node obstacle within the area of the nodes…


Which version are you using?
I cannot replicate this in 4.2.8.