[#445] Refactor a loop in multilingual plugin

This just makes a small loop in ckanext/multilingual clearer, the logic
should be the same.