It seems that city guards will attack you if you are in hostile status, right? I am not sure if the guards attacked us because we were fighting blue names or just for being hostile.
Today when I logged in, my guild mate told me to come to one of yellow zone with hostile status. I didn't know what was going on but went there and found they were already in a fight.
Later I asked what was going on and found out that they came out of a hellgate and then attacked by blue name players. They wanted to go back to the city but the internal timer was preventing them to go non-hostile. Those players in blue names kept attacking them with the support of the city guards.
In short, the players in blue name with actual hostile intention attacking the players in red name who wanted to unflag themselves, the system was being misused. It should be the other way around. (It could be just coincidence that they were all there and, "look! red names! attack!" was the case.)
Here's my thought about how to fix this.