Fix for machines and their power problems

Fixes machines being powered after construction in depowered area
Fixes vending machines and autolathe being unaccesible for maintenance
when depowered
Fix #5321
Partially fix #5832