Ensure input trees have consistent rootings