Merge "Fix issue #21571700: Need to be smarter about how foreground..." into mnc-dev