Fix typo that would crash on some non-binary trees