When a poet takes the substance of an earlier passage and expresses it differently, the main issue is the relationship between the borrowed meaning and its new form, not exact verbal identity. The later form may be clearer, weaker, or comparable in effect.
Changing all the words does not necessarily erase literary dependence. The analysis asks whether a particular prior expression supplied the idea and how its verbal realization has been reshaped.