Fix regression of word breaking

Fixes #2845