Use `newLinkedHashSet` instead of `newHashSet`, because that gives a deterministic order.