The nested call to replace_ending_clause must be pushed in the result instead of concatenated because the clause can be OR-ed. And pslice must remove depth from the length of the sting. issue11477 review421151003 (grafted from b4f0e27a3198630d60b73ee59f0d175f707b3fec) --HG-- branch : 6.0