Fix `hub browse` on detached HEAD

Fixes #588