Fixed function used to filter visible folders.

Specifically, controlled the case in which the root scope contains no feeds in the passed folder. This was not properly controlled and caused the logic to fail in many causes, with unwanted results (folders not becoming visible or the opposite).