When receiving a message to delete the root layer, delay it until the next new picture message, so that the layers only disappear when we start displaying the new page, and not the moment the DOM on the old page is destroyed.