Make internal Tree data structure strict (fixes #169)