This line is the first in both the bidi and non-bidi case.  Can't it be left out of the conditional and just appear once?