Generalise origami-build-pair-tree