Handle node visibility in circulate_leaves