If I recalled correct, because the rules of header buttons in building blocks only apply to the first child, the left-outline(separator.png) will not be applied to the other children, which means if you only change the hidden value, the left-outline will not be displayed, and that's why I used removeChild in line 99-102.