It is creating useless work as the commuted nodes is the same as the node we are working on in that case.
OK, benchmarks. Compiling clang from a bc containing clang in its entierety. With the patch:
real 9m45.457s user 9m44.085s sys 0m1.384s
real 9m45.521s user 9m44.016s sys 0m1.517s
The impact on perfs is not very significant. It's within the noise.