Digispark clone won't start when powered

I've used this thing before successfully, the program just reads a voltage then outputs it as a SPI master. I was using it to set the gain of a programmable gain amplifier.

Right now if I program the Digispark then the LED starts to flicker showing the program is running, if I reset it (P5) it waits then resumes flickering, but if I plug it into USB it just loops in program mode with the computer reporting USB connect/disconnect cycles and if powered externally the LED never lights and the outputs don't change. It seems like it is losing the program when powered down.

I probably should give up on it but it was really convenient for controlling the amp under test before and all that's really changed is I've tidied up the test jig.

As an update to the above I tried a different board and it remembers its program as expected. I think the first one is damaged somehow.

Are you using the following ATtiny85 Dev Board?
Attiny85DevBoard

No its the older one where the PCB sticks straight into a USB socket.

Is this one?
DigisparkAttiny85Board

That's the one. Its a "clone", the originals have the reset pin disabled so P5 is usable as an input, but the clones typically reset if P5 is grounded.

Incidentally I wonder if the problem I'm seeing is the same as this: Digisparks fail after days/hours

For clarification for the benefit of anyone else reading this: Reflashing with up-to-date Micronucleus fixed it. I used an Uno with ArduinoISP loaded, and used AVRDUDESS to perform the programming. It was possible because the Digispark P5 pin was configured as Reset, which is common on "clones". On originals P5 is a GPIO pin.