This is correct.

> All the members of the cluster got changed, in which case ```old_nodes``` is ```[]``` (I would have expected it to contain a list of the previous members of the cluster, but I'll trust that you're right)

You read the code too fast, then. We explicitly only keep the nodes that are common between old and new roles.