Fix close() of HeapFileIterator so it throws an exception if it's closed.