Parashas Eikev · Passuk 7:26
You must not bring an abhorrent thing into your house, or you will be proscribed like it; you must reject it as abominable and abhorrent, for it is proscribed.
Torah Temimah points to Avodah Zarah 54b.
TT lemma: והיית חרם כמוהו (unit 4 of 7).
English: It was taught: Exchange-items of idolatry are forbidden — straightforward from “you shall become banned like it,” i.e., like the idol itself, speaking of what comes from the power of the idol (e.g., one swapped an idol for another object). Exchange-of-exchanges: R’ Yishmael b. R’ Yose and the Sages disagree — one forbids from “you shall become banned like it” (whatever you generate from it is like it); one permits from “for it is banned” — it, and not exchanges of exchanges.
Dispute (status of exchanges of idolatry)
Direct exchanges of an idol are forbidden; further exchanges are disputed.