Clone the query object so it cannot be modified by tampering with it after passing