Fix container option not working on keydown and index being off by 1 when data-hidden is used

This fixes issue #466,  the menu not obeying the container option when opened using keydown.

This also fixes issue #475 where the index is off by 1 when data-hidden="true" is used to create a placeholder title.