Add test for using objects inside of iterators.