That's just weird from looking at the code. Thank you for the full error.
The only thing I can think of is, do you have the lights on turrets mod setting enabled?
Although even then the current code won't cause an error, but maybe if the save was from an old version of this mod that had a bug in it, it could get into an error state. Hard to tell and just a guess.
Another possibility is that this mod is clashing with another mod in some bizarre interaction. But then you would have lost power poles as part of the error.
Added some protection to next version of code to avoid this error if it's turret lighting related (turret and real power pole on same position, with the turret lighting feature enabled).
Note to self: the error looks to indicate then when we remove the old hidden light at the location of the power pole, the power pole is also vanishing when we come back to it to add the new correct hidden light for it.