One more fix for the cleanup_logs() call for a removed document.