Add "isDescendantOfActive" function