Avoid infinite loop with bucket listing and encoding_type='url'.

Fixes: #2561