Fix a bug where layout isn't invalidated on bounds change.