VE-1558 Template search UI

https://wikia-inc.atlassian.net/browse/VE-1558
So array should not be index in this way, because then you go over property 'length' as well