Fix invalid "flatten()" usage for apt repositories