ACM and 747
The flap will close as long as there is power and as long as flap closes de oil sequence is completed so it shouldn't matter whether batteries or external power closed it and shouldn't cause any problem in next start. This problem is basically while securing the aircraft when there is no external power and you switch of the batteries before flap closing.