More sensible (and also more idiomatic) bounds checking on esc_args.