Fix anonymous parameter handling

I haven't had time to test this as I'm not on the right computer...
But it's a simple change just makes sure that question marks are
replaced with gensyms, so queries with anonymous params still possible.