Bug fix for incorrect indexing of menu json array when <separator> items are not injected.

Brian can you pull this.