Fix problematic comparisions in REQUIRE_UINT

Checking the lower bound doesn't work correctly and checking the upper bound leads to a compiler warning.