Fix EZP-22118: Valid nodes must take translation into account.
(cherry picked from commit 602cd88f6b30514e5f2a3e557e847e926e0ceb37)