Fix inproduct https redirect sampling.

Moved the sample check to outside of the cached call.