Selecting the shortest edge of a closed curve in grasshopper

Something like this should work with Item Index.

See the post below for a better explanation (its not a bug).