Fixed a bug that partially executed partitions can be put into cache (in task killing).

This should go into 1.0 since it would return wrong data in task killing.

Thanks @aarondav and @ahirreddy for reporting and help debugging this.