I'm betting that the original problem was that the cogs and chain were worn out. Replacing the derailleur, in that case, was fixing something that wasn't broken. Replace the cassette and chain, and I'll bet it works just fine.
__________________
Je vais à vélo, donc je suis!