Duemilanove weird behaviour

Hi guys

I have an Arduino Duemilanove and a Yun.
Today I wanted to write some code to my old duemilanove, but saw that it wasn't working anymore (tried to upload code, and it said that programmer isn't responding). Then I thought to just use it as a power source for my Yun (connect the Yun's Vin to Duemilanove's 5V and common GND). When I connected them, my Yun powered up normally, but suddenly my Duemilanove started the "Blink" program.

I tried to write some other code on it and it worked. The code runs, I read stuff through different pins, but only as long as I power my Yun (or any other 5V device) from it. If I disconnect my Yun, the Duemilanove stops working (the only led working is the green power one) - it doesn't respond in any way, can't program it, can't see stuff on serial monitor, doesn't reset when I press button, nothing.

Ideas?