As the diagram shows, find_geodesic_path_poly will generate something unsatisfactory when there's overlap in the dijkstraPath. I remember the original author of the papar said that there's some problem when overlap / knot / loop presents in the initial path.
My workaround is to find the edge path by myself, making sure there's no overlapped vertices before calling the function.