Fix GET regression in s3.query

Was broken in #19079
Merge pull request #19251 from Lendar/fix-s3-get-regression

Fix GET regression in s3.query