I've traced the problem.
There's power to the switch on the gearbox, and when I short the terminals the reversing lights come on. So I assumed it was a faulty switch. But with the switch removed from the gearbox it works ok - if I push the plunger the switch closes and the lights come on.
So it looks like the switch isn't engaging when I put the gearbox into reverse.
So my question is, is there any obvious reason that the gearbox won't depress the switch plunger? Is there something missing from the gearbox? Have I perhaps got the wrong sort of switch? It looks like this one:
