Rewrite tuple:next() using iterators (Bug#1194145)
Merge branch 'bug1194145'