I had to replace my HP22 gearbox two or three years ago, luckily they are also used in the XJ40 so a 2nd hand one didn't cost a lot. However recently on occasions, on selecting D from neutral there would be a delay before engaging. On the way to the MOT a week ago, it also took a long time to shift up from 1st, so today I replaced the filter and fluid (got about 5 litres out of the 8 litres total)
I was suprised just how much rubbish the magnets had collected and how dirty the fluid was in just a short time.
Everything now working normally again

Oh, by the way, it passed the MOT without any problems!
When was your filter last changed? could be cheap insurance.
Pop