Ported: Fix EZP-21280: tree_root setting ignored in link output from XMLText rendering

Ref: https://github.com/ezsystems/ezpublish-kernel/pull/464