Child groups with all parents disabled shows in group list
Well, you could still have contacts assigned to a (enabled) child group, so I don't find it very surprising you can use it on search.

More generally, what enabled/disabled means in the context of group hierarchy is probably not fully clear, and it's likely that different users expect different things, and it's especially true with multiple hierarchical relationships.

Wouldn't it be easier you disable the child groups when you disable the parent (assuming it's not happening too often)?