fixes #17999: buildRendering fails in rtl
(cherry picked from commit d60271f19557b5706237990273009cc666991b82)