CGE2: Avoid some signed/unsigned comparisons