# authorindex+natbib producing incorrect page numbers

I am using natbib and authorindex. The authorindex manual, section 7.2.3, indicates that there is a conflict between the two packages and suggests a fix that involves creating a natbib.cfg file. When I do this, the author index produces incorrect page numbers. I suspect the problem is in the natbib.cfg file, but I am not familiar enough with that part of LaTeX to interpret the code in that file. Here is a MWE:

mwe.tex

\documentclass[12pt]{article}

\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[biblabels,editors,firstabbrev]{authorindex}

\usepackage{natbib}

\begin{document}

\blindtext[7]

\citet{Ha13}

\bibliographystyle{abbrvnat}
\bibliography{mybib}

\section*{Author Index}

\printauthorindex

\end{document}


mybib.bib

@article{Ha13,
Author = {Harris, Ford W.},
Journal = {Factory: The Magazine of Management},
Number = {2},
Pages = {135-136, 152},
Title = {How Many Parts to Make at Once},
Volume = {10},
Year = {1913}}


natbib.cfg

% natbib.cfg
\AtBeginDocument{%
\ifNAT@numbers
\let\org@@citex\NAT@citexnum
\else
\let\org@@citex\NAT@citex
\fi
\def\@citex[#1][#2]#3{%
\typeout{indexing: [#1][#2]{#3}}%
\org@@citex[#1][#2]{#3}%
\@aicitey{#3}}%
\renewcommand\NAT@wrout[5]{%
\if@filesw{%
\let\protect\noexpand\let~\relax
\immediate\write\@auxout{\string\aibibcite{#5}{#1}}%
\immediate\write\@auxout{\string\bibcite{#5}{{#1}{#2}{{#3}}{{#4}}}}}%
\fi}}{}}
\endinput


I am compiling the document as latex > bibtex > latex > authorindex > latex. All of these commands are run from TeXShop, except for authorindex, which I run from a Terminal prompt, as authorindex mwe.

The reference is cited on page 2 of the document, but it shows up in the author index as page 1:

Problem solved. I was using the biblabels option, which meant that authorindex was reporting "the reference label as it appears in the reference list" (according to the authorindex manual), rather than the page number. Under abbrevnat there are no reference labels, so I assume they are treated as consecutive numbers. Thus, my one reference was showing up as "1" no matter what page it was cited on. (And when I added more references, they showed up as 2, 3, 4, ...)
Removing the biblabels option fixed the problem.