fixed index lookup to handle non unique names
Merge pull request #367 from tanmaykm/tanmaykm

fixed index lookup to handle non unique names