Fixed infinite loop in powernet rebuild.

If a /obj/machinery/power wasn't anchored, it wouldn't get a new list of connections, so would endlessly loop on the old list, of which that object was the first entry, ensuring that the loop would never terminate.
Merge pull request #2390 from Uristqwerty/master

Fixed infinite loop in powernet rebuild. (Issue #2385)