traversableOnce is not safe to go through twice. That's the point of the name "Once". You have to put it in a buffer.