Fix bug in read_write_artifact_cache.

Auditors: pl