When updating you only update until you reach a node where you are updating the entire range, then you flag it for update.
When querying, of you reach a node that is flagged for update, then you perform the update on it and push the flag for update to it's children.
0 0 6
Update value in 0,6 and turn flag for update on.
0 0 3
Push update from 0,6 to 0,3 and 4,6 and update their values.
Update value in 0,3 and turn flag for update off.
0 2 5
Update value in 2,3 and turn flag for update on.
Push update from 4,6 to 4,5 and 6,6 and update their values.
Update value in 4,5 and turn flag for update off.
0 1 6
Update value in 1,1 and turn flag for update on.
Update value in 2,3 and turn flag for update off.
Update value in 4,6 and turn flag for update on.
1 1 6
Return value from 1,1
Return value from 2,3
Return value from 4,6
If you have read the rest of the topic you know that whenever I have an update flag set on a node it's value is correct but every node below it needs to be updated.