Use the unexpanded size of text when checking for overflows.

Fixes #286.