bridge: Properly test for out-of-range values.