fix structural identity in the polymorphic case