I think that the problem with the query results from the data type of the column you are selecting for the Key column. The Key column is assumed to be an integer value so it does not treat the value as a literal.
I have logged a bug on this, until a fix is made available you will need to update the sql to add in the quotes around the value.