Kudos to Jonathan for recommending the logic analyser, here's what I've found on the PWM channel:

Click image for larger version. 

Name:	PWM_analyse.png 
Views:	457 
Size:	34.3 KB 
ID:	10926

This was due to the fact that I was updating the PR2 without waiting for the PWM cycle to finish (I was doing that before, but you need to clear the TMR2IF flag before you go into the while loop; normally the flag gets set and sits like that forever, unless the TMR2 interrupt is enabled). I've now changed the code slightly and voila! no glitches.

Regards,
dsc.