Fixed exception when deleting item that has many-many relation from list view. Regression from #478
reapplying fix to #499, rolled back by #530
Merge pull request #545 from JohnnyEstilles/hotfix/reapplying-fix-499-rolled-back-by-530

reapplying fix to #499, rolled back by #530
Merge pull request #543 from thedersen/fix-delete-list

Fixed exception when deleting item that has many-many relation from list...