#2719: backport next() from 3k.
4 files changed