Fix Versioned::augmentSQL() when the data query was null.
Merge pull request #2482 from ajshort/pull-2

Fix Versioned::augmentSQL() when the data query was null.