Fix creating subtrees. Broken in 07d3e7681bc07d5344246503c22a8c057861477b