I think I have found the reason why the probe wasn't working right, as I had the M558 and the G31 in the wrong order. RTFM!
To specify which probe you are setting parameters for, send a M558 command to select the probe type before sending the G31 command, or use the T parameter.
So, fingers crossed, it's working OK now.