Adds breaking test

If you're querying against an index, loki throws an error on an empty collection. I can propose a fix if this is accepted.