This is really strange. You can try it yourself..... put a product in the cart and unpublish it, reload and it should be gone.
lol damn, does not work. you are right. There is a small typo. Open the cart helper /components/com_virtuemart/helpers/cart.php
Search in the function prepareCartData around line 1574 for
$productTemp = $productsModel->getProduct($productdata['virtuemart_product_id'],TRUE,true,false,$productdata['quantity']);
and replace it against
$productTemp = $productsModel->getProduct($productdata['virtuemart_product_id'],TRUE,TRUE,TRUE,$productdata['quantity']);