Animals have reactions too. If you manage to push Scratch's reaction high enough, the negative reaction to the imp isn't enough to push him to attack. But I have no real idea how to do that since the reaction messages are really circumstantial. Lots of petting, maybe?