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

CRAFTERCMS-857