I apologize in advance is this Bug has been reported elsewhere. I searched but could not find it.
The issue is as follows. A normal turret is constructed like a classic battleship battery. The casing pivots left or right, and the attached barrel pivots up or down. However when you attempt to build a turret in reverse order, where the casing pivots up and down, and the barrel moves left or right it bugs.
What I noticed was when pivoting the turret collision detection for the ship isn't detecting the barrel touching the ship. If you rotate far enough the turret will lock with two blocks interposed on top of each other. When this occurs pressing C will reset the turret however when pivoted too far no collision occurs again and the process repeats its self.