You most likely weren't giving the Ivermectin correctly and long enough to be honest. I have never heard of it not killing parasites. When all 8 of my rats had lice I used Ivermectin and it killed them instantly. Do not use dog shampoo on rats, it is way too powerful and the medicine is too strong for rats- it can kill them.

Did you make sure to disinfect EVERYTHING the rats come in contact with a couple of times?

I suggest doing Ivermectin again, give them a little dot the size of uncooked rice. I also bought powdered flea and tick control made by Zodiac and sprinkled that in the bedding- which also helped a lot in killing the lice. It has carbaryl in it which is awesome in killing parasites.