Recapture of foreign loss does not exempt other gain from tax