Hi ajd,
It sounds like high-speed termination issues. Typically, when high-speed signals > 1MHz travel down a long wire such as the 5M cable, reflections could occur if the signal is not terminated correctly. The situation that you are seeing is that you are terminating the 5V line with a high impedance such as your finger or the probes and this stabilizes the 5V line which in turn can be stabilizing your other digital lines. Your 5V line should be stable but it is probably picking up signals along the cable and thus is becoming a high-speed signal itself.
The best easy solution is to terminate your signals with a high-impedance such as a large resistor. However, what you are seeing is not uncommon when dealing with high-frequency signals in a l
ong cable. I am attaching an excerpt from one of NI's documents regarding high-speed effects. Hope that helps. Have a good day.
Ron