f99a55fca7
This makes the code slightly less efficient as it constructs intermediate structures BEFORE filtering, but it makes it for simpler code to maintain down the line. Performance is not visible affected as the largest lists involved count around 200 items.