Remove some duplication concerning building of mirror instances.