Fixed issue on query against indexes with context variables