Fix boundary checking for hex immediate values.