public function buildLineages() {				
		$indis = \Fisharebest\Webtrees\Query\QueryName::individuals($this->tree, $this->surname, null, null, false, false);
		
		if(count($indis) == 0) return null;
		
		$root_lineages = array();
		
		foreach($indis as $indi) {
			$pid = $indi->getXref();
			if(!isset($this->used_indis[$pid])){
				//Find the root of the lineage
				/** @var Fisharebest\Webtrees\Individual $indiFirst  */
				$indiFirst= $this->getLineageRootIndividual($indi);
				if($indiFirst){
					$this->used_indis[$indiFirst->getXref()] = true;
					if($indiFirst->canShow()){
						//Check if the root individual has brothers and sisters, without parents
						$indiChildFamily = $indiFirst->getPrimaryChildFamily();
						if($indiChildFamily !== null){
							$root_node = new LineageRootNode(null); 
							$root_node->addFamily($indiChildFamily);
						}
						else{
							$root_node = new LineageRootNode($indiFirst);
						}
						$root_node = $this->buildLineage($root_node);		
						if($root_node) $root_lineages[] = $root_node;
					}
				}
			}
		}
		
		return $root_lineages;		
	}