Fix bug in indexed tests