has_entity always return top level entity