Revert "Simplify the transform iterators."

This reverts commit 2fae677ff45dae2fb00454fbfe0e9e55cf01303f.