In Python 3, `filter()` returns an iterable rather than a list. Whilst this is better for performance, our list is not long and it means we can call `len()` on the list. Tested using reproduction steps in #3814 and verified that language packs can now be installed properly. Closes #3814