AVR main loop interference with relay
Your hand was probably part of the problem in this case. By capacitively coupling the noise from the coil -- which would not be snubbed (snubbered? LOL) okay clamped by the diode since the break was at the coil to ground you've probably introduced noise through other conductors. The voltage at the coil end could be hundreds of volts when the connection breaks. 

This is not necessarily a problem since it's an unusual situation but it points out that you may need to protect or shield your inputs, outputs or internal wiring better. 

BTW, you don't need an extra diode across the relay coil if it's close to the ULN2003- there's a diode available in there if you tie it to the relay supply voltage. Of course if you're switching mixed voltages on different outputs with the ULN2003 you may wish to use external diode(s) to control to which supply the energy is returned.