Fix shortcuts offset when branch_shortcuts encounters detached HEAD

fixes #127