The Arduino bootloader intercepts all resets, and will likely interfere with the user sketch determining the reason for reset. (this is certainly true of Optiboot: Google Code Archive - Long-term storage for Google Code Project Hosting. ) Whether it's true of 168-based arduinos (which run one of several other bootloaders) is uncertain...)