Make `wp media regenerate` work better with `seq`

Prompted by #931.