This is an alternative to the default swapmaster behavior that, instead of swapping with the first child, swaps with the last active window if the currently focused window is master.