Does it make sense to set the layerset twice in a row?    I just notices because this conflicts with 24b0a6468937d195e87f1f2528c4d0f3f328eaf7 where 181-189 was replaced with a call to theMapRenderer.setLayerSet( layersToRender() );  that should probably only done if -1 == mCurrentExportLayer