Only the ID base tree element type doesn't yet use the polymorphic
tree element design yet, and this case is handled in an earlier branch
excluding this `else` block. So this would be dead code.
Add assert to protect from future changes breaking this assumption.