ENYO-365: Prevent text from overflowing bounds.

Cherry-picking from `2.5.1-release` into `master`, creating PR for tracking purposes.