Make single() methods close iterators that are also resources