Properly close tuple iterator in test framework.

An iterator I'm using depends on being closed to close its underlying resources, but was being left open in tests.