Fix for IEnumerable and multiple iterations.