Fix bug that caused width computation to happen for every operation
Fix problem caused by ordering of scroll width measurement and width adjustment

Closes #2730