Best way to do it is to adjust the limit screws in to limit the travel of the mech, then if you find it hits the chainstay, prise the u shaped washer off the back, take out the spring and clamp tot he frame like that...this effectively fixes the mech in place and stops it swinging up.