If its like the X250, the abs sensor was attached to the wheel bearing and came as one part. I had a dodgy sensor (which threw up all sorts of warning lights) and mechanic connected an old one to it and works fine
I also have had this problem and it is a scary experience if you have just pulled out from a junction into traffic......
It has happened to me quite a few times in a 2.2d 200hp 2013 XF (work car, 45k miles). I also have a XF S 3.0d 2009 and nothing like this has ever happened in it, in 90k miles.