Add support for virtual root on the extraction algorithm.