The mines you build around colonizeable asteroids/planets lose their allegiance penalty if the planet becomes unowned (destroyed, scuttled, etc) and produce at 100% efficiency.
This bug was actually called out a long time ago and I thought fixed, maybe it came back?