Push the list-to-set refactoring through a bit further, but not all the way (CC #2)