Cannot increment depth if depth is None (i.e. the transmutation is being run without a tree file. Added conditional incrementing to this value to address the issue.