J3/F3.1 make correct urls in related data links...

in case the related element is not in main table but in a joined group
(cherry picked from commit 808c3616e79c3363dd5f8e2897ee72ebeeda9c71)
Same solution like for F30: https://github.com/Fabrik/fabrik/pull/1016