backport mscc_main change for 5.16.17, 5.15.31, 5.10.108