Deduplicated IP data access
The recently introduced code duplication (by myself) is deduplicated with this MR.
I also added some compile-time checks. Those revealed that I used my recent addition wrongly in the TRM process (aka bug). This wrong use has been fixed, now.
Relates to #3306.