Funny you should mention this, i've had this problem for years and so have a few other people, it's the raw that shows the modes of the channel, in a debug it shows it once, yet when it's scripted sometimes it can show up twice, i've had it show up 3 or 4 times before, and it's not just 1 type of irc software, it's happened on 4 or 5 different servers, i can't remember if i have ever seen anyone report this as a possible bug, i've tried it on a plain mIRC with just that raw scripted and it's done it,.
I just gave up and halted it in the end, so i'll be interested to see if anyone else has had this problem.