vcs: fix tag/version in detached state