The first encounter wasn't counted for, which resulted in a bias of one (vertices with single neighbor return false), I initialized the counting from 1 instead of zero which seems to solve the problem. Pull Request: https://projects.blender.org/blender/blender/pulls/129021