Replace set comprehension for 2.6 compatibility