[iterators] Fix return types of templated assignment operators.