Fix a bug that left open inputstreams when splitting input.

This caused us to eventually to have too many open files on very large
datasources.