This will blow up if `ids` is empty