CRAFTERCMS-857
Fixed stack overflow exception caused by circular dependencies on delete
Merge pull request #246 from dejan-brkic/2.2.x

CRAFTERCMS-857