Fixed get_published_ancestors to respect the published filter