     WHEN listing_changes_timeline.context -> hi.species_listing_id::TEXT = hi.taxon_concept_id::TEXT
     OR hi.taxon_concept_id = listing_changes_timeline.original_taxon_concept_id
     -- this line to make Moschus leucogaster happy
-    OR AVALS(listing_changes_timeline.context) @> ARRAY[hi.taxon_concept_id::TEXT] 
+    OR AVALS(listing_changes_timeline.context) @> ARRAY[hi.taxon_concept_id::TEXT]
     THEN TRUE
     WHEN listing_changes_timeline.context = ''''::HSTORE  --this would be the case when deleted
     AND (

    hi.change_type_id,
    hi.event_id,
    hi.effective_at,
    CASE 
    WHEN (
        hi.inclusion_taxon_concept_id IS NOT NULL
        AND AVALS(listing_changes_timeline.context) @> ARRAY[hi.taxon_concept_id::TEXT]

      AND excluded_geo_entities_ids @> taxon_concepts_mview.countries_ids_ary
    )
    THEN FALSE
    WHEN ARRAY_UPPER(excluded_taxon_concept_ids, 1) IS NOT NULL
    -- if taxon or any of its ancestors is excluded from this listing
    AND excluded_taxon_concept_ids && ARRAY[
      affected_taxon_concept_id,
