[ticket/12639] Handle $conditions['keywords'] outside of the loop

PHPBB3-12639