Variant Grouping Bugfix

(Includes our proper duplex AR relations; closing other outstanding PR since this one is cumulative.)

This fixes variants not having batch_id set if they were generated using the option_types instead of by the explicit row-based strategy.