The turret-upgrades have a problem for worlds with multiple surfaces.
The turret will just despawn when a upgrade is reached, if the turret is not on surface 1.
I fixed it in the "control.lua" in function "ReplaceEntity" by replacing "game.surfaces[1]" with "turret.surface".