[mcs] Check for missing dependencies of container types. Fixes #20382