Are product_version_ids unique per build_date and os_name? I think our test data probably is just lucky in that it hasn't run into a dupe there...  Same comment for line 72 removal below.