First of all, Worf was on the command track when we saw him in Nemesis. That was a red-trimmed uniform he was wearing. The explanation in A Time for War, a Time for Peace was that he was filling in at tactical as a favor to Picard and Riker -- over the course of the A Time to... miniseries, the security force on the Enterprise suffered huge losses, and Vale, the security chief, was taking leave after the Earth wedding. So, for what should have been a milk run to Betazed for the second wedding, Worf took Vale's shifts at tactical. After that, he was going to join Riker on Titan, but after Data's death, Picard requested he stay on the Big E.I don't think Madden becoming an XO would necessarily be an insult to Worf. Obviously the character had already left a high profile, prestigious position as ambassador to return to being Chief of Security on the E, so maybe that was an indication, or could be that he was happier being a Security Chief than back on the command track.
Any position other than first officer would've been a demotion for Worf.
So yeah, putting Madden on the Enterprise would've been a huge insult to Worf.
