flight.js: Renamed variables in getNextSmallerIndex() function