gitk: Fix a bug in collapsing deeply nested trees