Add tree subclasses for correct subsetting behavior.