A lot of people forget that the primary purpose of RAF & RN rescue aircraft were for the military themselves. Civies came second.
If a helicopter was on route to a civilian incident and a military requirement popped up, they would divert.
However, now that its all privatised, I'm not sure where priorities lie.