ATMEGA328 locks up on watchdog reset

Try adding this at the beginning of setup():
wdt_reset ();

If you are using a bootloader, use optiboot.