Updated ancestorHasLoading to check only direct children for show-background