Fix paint invalidation when composited layers change from paints-into-ancestor to self-painting.

Previously it was the case that we would update the setting before issuing the paint invalidation.
This doesn't work, because the paint invalidation code uses the current state to find the right
invalidation backing, not the previous state.

BUG=405250

Review URL: https://codereview.chromium.org/512293002

git-svn-id: svn://svn.chromium.org/blink/trunk@181114 bbb929c8-8fbe-4397-9dbb-9b2b20218538