[gsubgpos] Guard integer arithmetic against wrapping below zero When either casting a signed integer to an unsigned one or subtracting a value from an unsigned one, add assertions to verify we will not end up below expected bounds.