Merge "Fix integer wrap sanitisation." into sc-dev