Add test for index reverse iteration bug.
Add a similar test for collection iterator.