Fix segfaults in terminal resizing, introduced by re-engineering.