Fix `dependent_objects` when using single table inheritance