flight.js: fix getNextSmallerIndex again.

This method doesn't do what it's said to do: it returns the next
smaller index to value in array but at least 0.