Fix beforePaint node calculation further.

Aborting when the extra wasn't allocated was just wrong. In addition
we didn't check for visibility/effectRefs which brought this
implementation out of sync with the children we added/removed in
the ChildUpdateMask block up above.

Change-Id: Ie174a683bb3712e392fece1636844e30574a1406
Task-number: QTBUG-42207
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Fix typo in Q_ASSERT_X warning.

Change-Id: I1415de93af35177fd643c21bcae2492a79187e50
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>