Deductions & credits

From your question, it sounds like you claimed the foreign taxes in the past two years to get a tax credit.  If you already CLAIMED the refunds, then you must go back and file amended returns for the past two years to show that those credits have been refunded.  Since a credit comes out of the total tax liability, you will owe the amount of the refund to the IRS.