Strange Optiloader bug?

I've been trying to program a 328p with Bill Westfields (current) optiloader, and I've run into an odd problem. If I comment out the loop() code as follows:

      if (!target_identify())        /* Figure out what kind of CPU */
#if 0
      if (!target_findimage())       /* look for an image */
      if (!target_progfuses())       /* get fuses ready to program */
      if (!target_program())         /* Program the image */
      (void) target_normfuses();     /* reset fuses to normal mode */

then it loads and runs fine; obviously it doesn't do anything, but it signs on and says politely that there's no there there.

However, if the code commented out is left in place the program compiles and downloads successfully but hangs, with absolutely no sign-on or serial output whatsoever.

Anyone any ideas? Will

Which version of the Arduino IDE, which board are you running optiloader on, and what chip/board is the target?

A (pretty exact) Arduino clone called a Nanode, and the 1.0.5 Arduino IDE. The target, which wasn't involved in the hang, was a perfboard 238.

It really was very odd, and I still don't understand what was happening. After a few hours I found Nick Gammon's Arduino tools on Github, and his detector, programmer and fuse checker ran fine.

However, the chip is now programmed, so I can risk building it a more permanent home. Once that's done I'll have another shot at Optiloader, because it's a nice idea which almost always works (unlike ArduinoISP).