I spent a lot of time researching this issue and I came to the conclusion that the attached patches do not fix the problem. Instead, they make things worse.
If you look carefully at the "before" screenshot, you see what appears to be an empty tree and below it is a series of menu lines. The patch attempts to fix the problem by adding text to the empty tree. But that doesn't fix the problem because that empty tree is supposed to contain the menu lines displayed below it. In other words, the tree renderer is seriously broken.