tracking down indexing bug