Account for cookie_prefix in the work-around for #3094