Fix 1.8.* problem with Query#dup implementation.