Using HashSet.reduce fixes resources_for_types