Ditto with Imposter vs. Kirlia with Trace
Kirlia copied the foe's Imposter!
...What would happen then?
Ditto would have used Impostor and transformed, gaining Kirlia's Trace.
Nothing because ditto becomes kirlia and kirlia traces ditto which makes it stay as kirlia. When the next Pokemon comes out than it changes its ability to the next opponent.