cherry-pick: detect bogus arguments to --mainline