I assume the same principle would also apply to other specialists' pay too - Submariners, Clearance Divers, Parachute Jump Instructors etc......
However, in civilian life it is quite normal to have a pensionable base salary and then other additional allowances on top which are still taxed but do not get included in the pension calculations e.g. a pilot may get a TRE allowance and a location weighting. So I'm pretty sure the law is not as black and white as to say that if you pay tax you must be able to include that element in your pension.