This test checks the situation described in Bugzilla #37743: A ClassCastException after an fo:inline with a border followed by a character.