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
Committed:
https://src.chromium.org/viewvc/blink?view=rev&revision=181114