traverse freeedges when detecting islands. fixes #1213.