Fix bug with `has_many_as_polymorphs`