# UV Islands. how to distinguish them?

If somebody knows: when we pick two points on UV image and search for shortest way in 3D, than return selection of shortest path to UV, we have problem, that selected vertices not only from initial island, but also all vertices that share same points in 3D mesh. So, question to deselect other islends that not selected initially...

for f in bm.faces:
for l in f.loops:
luv = l[uv_layer]
if luv.select: