Corrects invalidation of width

The width is not recalculated when `invalidate('width')` was set. This is related to #207.