Add test case and bug fix for double serialization of delete_by_query queries.
Merge pull request #420 from Locu/upstream

Add test case and bug fix for double serialization of delete_by_query qu...