Autogrow: calculated height contains border height

Fixes #6178