Fix subtree extraction for cactus2hal