Your program will produce no output if
selects no nodes.
Since you haven't shown us what's in $targetTree, we can't be expected to work out why this path expression selects nothing. Of course there might be other explanations as well.
Or perhaps $targetTree is really $VariantA? But now we're trying to debug a different program from the one you showed us. I'd rather go and play Sudoku.
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference