Correct a logic error even though "nextQuoteIndex > 0" works when there is no quote since npos is a large positive number.