Reintroduced the ``reverse`` fix for DDB.

This is more backward-compatible than the previous attempt.
Merge pull request #2163 from toastdriven/refix-ddbv2-query-reverse

Reintroduced the ``reverse`` fix for DDB.