Hi András,
Is the attribute tree_id a calculated attribute? If not, your expression won't work because when you create a new tree, there is no value for that attribute and the expression $this/parent()/tree_id - 1 cannot be calculated.
There is another solution that can work and uses the idm:position function. Take into account that you can use the variable $context that is equal to $this/parent().
If you only need to get the value of the previous tree, the expression can be:
parent()/tree[idm:position($context) - 1]/species
Let us know if it feets your needs.
Many thanks,
Open Foris Team