bundleRelations: Share the code for generating the discriminator between the two strategies.

Brings 'sharedBundles' up to date.