Fixes problem when sending down custom queries to index providers