Error when opening a submenu

Due to some recent refactoring in NERDTree, whenever you attempt to open a submenu, an error will be thrown.

This patch fixes said error.