escapeQuery shouldn't modify provided array