Merge "Add error checking to LayerRenderer::copyLayer"