In any case where a deduction is allowed under section
2053
(d) for an estate, succession, legacy, or inheritance tax imposed by and actually paid to any foreign country upon a transfer by the decedent for public, charitable, or religious uses described in section
2055, the property described in subparagraphs (A), (B), and (C) of paragraphs (1) and (2) of subsection (b) of this section shall not include any property in respect of which such deduction is allowed under section
2053
(d).