Changed facets/filters key-value loop

Don not use PHP functions like key() if you don't have to