This fixes a segfault in git_reference_owner on references returned from git_reference__read_head and git_reference_dup ones.