Removed group from layer after toImage

Removing each imageGroup from the layer after we generate an image out
of it to make sure we don't draw it twice.