Prevent an infinite loop.

Fixes the issue observed in the Google Storage integration tests
from #2462. The problem was introduced in f3e5d11. This only uses
the internal cached value instead of potentially triggering infinite
list bucket calls.
Merge pull request #2465 from danielgtaylor/s3-loop

Prevent an infinite loop. Fixes #2465.