SERVER-6405: fix dropIndexes looping code to make it more readable