We should change the API of ntree so we can check with a const. I added this as a todo for now and used a const cast.