Fix store exception when setting cookie on first HIT.