Fixed a bug where updating many-to-many did not work with inheritance.