If you have bundled up each variant then the inventory should be tracked across all bundles based on component quantity.
Our app will update all lines to the quantity of bundles that can be built. So in your example if X was 0 all the variants would be updated to 0.
Bundleup - bundle your products and unbundle your orders. Channelup is a product data management solution helping Shopify stores automate their processes. If you require custom development or would like to test out our features contact me at email@example.com