Fix bug: not rendering tree correctly if programmes are hidden.