This module resolves the core bug on 2.1.1 onwards causing configurable products to show as having no sub products when the first sub product is OOS.
Using composer...
composer require wearejh/m2-core-bug-configurable-get-sub-products
Enable the module
bin/magento module:enable Jh_CoreBugConfigurableGetSubProducts