Fix parseSymbolicReference: for detached HEAD case