FIX: Ref#resolve was broken for symbolic refs pointing to objects (e.g. detached head)