Non-unique tree names
In case multiple trees with the same name exist in the input file, the injection seems to produce unwanted results by only considering a specific tree. The code should be changed such that this is noticed and the injection is aborted with an error message notifying the user.