Fix tenacity polymorphic bug

Introduce polymorphic type filtering for polymorphic relationships in tenacity