Spend six bucks on a M16A1 compensator with the full bird cage. No indexing required.
Or use a strap wrench around the barrel to hold it while you tighten the compensator. Keep in mind the compensator has to come off to remove the barrel. Not sure what S&W uses, but I suspect the "A1" style.
-- Chuck