fixes #3890 error while deleting container used by template
Merge pull request #3936 from dotCMS/issue-3890-error-while-deleting-container-used-by-template

fixes #3890 error while deleting container used by template