Well indeed you are right, I spoke too fast. Now the impurity at the node (before split) is the correct impurity, which might indeed affect the improvement that is computed, hence the ordering of the nodes.