Entwinement in discretely gauged theories