Why is a slow worm not considered a snake?
You are correct that the reason is similar to that of convergent evolution of the eye.

Both snakes and legless lizards are lizards (Squamata) that have lost their legs. However they have done so entirely separately much as octopus and human eyes have evolved entirely separately. An easier analogy is between whales and sea cows. Both are legless mammals but as they have evolved separately the must be given separate names.

Unfortunately it seems that the exact position of the snakes in the tree is unknown which makes this explanation less clear.

http://tolweb.org/Squamata/14933

However, the legless lizards (subfamily Anguinae) are within the family Anguidae, most of which have legs. This family is within the Anguimorpha, which includes even more species with legs. Just one small tip of the tree, with around 20 species is legless. On the other side of the tree, separated by many millions of years is the snakes (Serpentes).

A related question is why are snakes given their own name while legless lizards are just considered lizards without legs. This is partially due to the fact that there are so few species of legless lizard while there are thousands of species of snake. It is also probably due to cultural history. As snakes are dangerous to humans and prevalent in most inhabited areas of the world words for snakes are much older than the study of taxonomy. A western example is the snake in the garden of Eden. It is also important in Hinduism
and many other cultures/religions.