fixes copy plugins for out of order plugin trees