is there a difference between flight "within class D" and "through class D" or is this a situation where practise has actually diverged from the rules?
No.
What you have missed is that "clearances given in flight" are, whether they look like them or not, flight plans.