Fix logic for has_basket_cookie.

Passes the unittests now again