(For a 2.79 branch.)
Selected UVs are stored for redoing the operator when the smart stitch operator is applied. The selected uv list is only cleared when the list is read, this only happens when redoing the operator. Using uv smart stitch again and again will cause the selection list to grow and grow. This could cause confusion or a crash when redoing the operator after uvs selection stored from one mesh are appied to another mesh.
This patch clears the "selection" collection just before it is written to.