The AWE code was broken. You aren't supposed to stand there with a turret gun in your hands, and have a turret on the floor. That isn't deploying your weapon, that's spawning another new weapon on the floor.
With my code, you don't need the "fix" function, because with my version, when you deploy it, you are holding the turret gun. There is no more need to press melee. This is the way it is supposed to be. The AWE code was broken. So, I fixed it.