DOM: Proper temporary container handling for invalidateDOM()