It is possible that the count reach more than SUGGESTED_LANGUAGES_NUMBER before it reach the languagesForButtons.length === SUGGESTED_LANGUAGES_NUMBER check. This will cause the loop to run for all languages. Change-Id: Ie6190d1c80c2a7152af490db2bc115ecdfde4184