Fix issue with structured query with multiple "should" clauses

When you add multiple "should" clauses in a structured query, the removeClause() function is called multiple times, since the default clause is itself a "should" clause. On the later calls, indexOf() returns -1, causing whichever "should" clause is last to get spliced out. This PR updates removeClause() to check that the clause-to-remove is present before splicing it out.