[[ Bug 13465 ]] Fix a few further memory leaks related to containers
Merge pull request #1191 from runrevali/bugfix-13465

[[ Bug 13465 ]] Fix a few further memory leaks related to containers