The visual_runs function does not yet implement step L1, which defines steps for adjusting the levels of certain whitespace and formatting characters.
In Gecko this is performed in nsBidi::AdjustWSLevels and nsBidi::SetTrailingWSStart.
This may also be a good place to adjust levels for removed_by_x9 characters, as in nsBidi::AdjustWSLevels.