Merge pull request #751 from Mossop/bug836318

Bug 836318: Items in submenus default to visible rather than using the PageContext r=@erikvold(cherry picked from commit 8ecc5decb9cd85c8c8eebebbb1c7fba15b039930)
(cherry picked from commit 0651ece3d98bfdf6307f3ed1c020fe475ce1c50c)