Avoid unnecessary container_close() calls and use removal callback functions instead.
Log an error when attempting to free non-removed object.
Fix tail parts of multi-arch objects not being freed.