Fix overestimation of max-width when using perrow mode.