Merge "Rephrase to avoid integer overflow" into sc-dev