Fixed an issue that caused where-raw queries to end up with two WHERE statements.