Index query fixes after commit 5e340942