We determine all the complex polynomials f(X) such that, for two suitable distinct, nonconstant rational functions g(t) and h(t), the equality f(g(t)) = f(h(t)) holds. This extends former results of Tverberg, and is a contribution to the more general question of determining the polynomials f(X) over a number field K such that f(X) − λ has at least two distinct K-rational roots for infinitely many λ ∈ K.