I originally installed Tk to several machines, but the problem appears at a single machine as well, as demonstrated by the loop. I was just curious why SelectionClear and SelectionGet cannot follow each other without some time interval. But maybe it's the test's problem, e.g. some other widget intervening and unsetting $@?