added test for indexBy exception, close #123