Could interference on a stripboard be affecting my input from a shift register?
When fast edges (flanks) are presented on a line that is not impedance-matched some ringing will occur. In most cases you will encounter your wires are either so short that this effect is very small, or (for non-clock lines) the line will settle before its value is used. 

You use lines that are a bit long, and at 40 MHz leave only a part of 25 ns for the lines to settle. Additionally, ringing on the clock line(s) might cause false (extra) clocks, and canges on one (or a bunch of) lines might be coupled to other lines.

A simple experiment could be to lower the clock frequency significanly (let's say to &lt;&lt; 1 MHz) and see whether the bad effects disappear.

What can you do? The best would be to impedance-match all lines, but that can be a tough job. What often helps is a 47 ohm resistor between the driving side and the line, and/or a small capcitor (think 22pF) at the receiving end.

Are you by any chance using a chain of HC595 chips? In that case you might be suffering from clock skew. The 'standard' first try is to feed the clock starting at the last chip in the chain insetad of to the first.