Yeah, that some kind of UX pardigm - don't hide the control. Disable it, and explain the user why he cannot use it at the moment.
On the other hand, though, I can now simply collapse huge branches without downvoting anyone, so thanks for the clarification! :)