Fixed bug with view-specific menu not being registered in certain situations