duplicate key value JDBC exception when indexing large Mercurial repo

fixes #683