I now know how I got my wires crossed.
Sometime ago I had suggested that instead of a button to just powerdown the RPi on a seperate GPIO pin (as we have now) we should have a reset button (like we have now) but it should be connected to the emonpi add-on boards reset line (and therefore GPIO pin7, used to flash the ATmega328p) NOT to a separate GPIO pin.
This way we would have a way to manually reset just the emonpi add-on board with a quick press and also a way to powerdown the RPi by monitoring GPIO p7 for a long press of the reset button.
When flashing the emonpi board, the listening is suspended and p7 is used (as usual) to flash the firmware, when it’s done it returns to an input pin listening for a powerdown press.
I’ve obviously since forgotten that the “RasPi Shutdown” button is not yet linked to the reset line!!!
(ref Powering down a headless Pi with no network connection)