Nested loop test.