I got the same error and your right, the error is in checkout_confirmation.php. I looked at this forum and found people like yourself with the same problem, but no fixes, so went through the code myself and found the error. Having fixed it, I thought of your entry and so posting my fix to you.
if (STOCK_CHECK == 'true') {
$bundle_status_query = tep_db_query("SELECT products_bundle FROM " . TABLE_PRODUCTS . " where products_id = '1'" . tep_get_prid($order->products[$i]['id']));
$bundle_status = tep_db_fetch_array($bundle_query_raw);