Add tests for PostgreSLQ bugfix regarding invalid SQL in subqueries when using matches() or does_not_match().