fix lpad/rpad (fixes #9158)