Hi - yes, you are right - static discharge could well explain it. I guess I can workaround in s/w by making by debounce routine look for a good period (e.g. 10ms) of high signal before a good period of low signal.
I've got 0.1uF between the vdd and vss pins on the PIC, and also on the MCLR input, but nothing on any of the other inputs/outputs.
For the relays, I'm driving them via a ULN2003A array, which I think includes the back emf diodes, so I have added any others