This is the second time I’ve encountered similar behavior. This time, I was able to narrow it down. If your query starts with a leading comment that includes a ‘?’, you get an error about missing parameters:
Actually add a parameter & the confusion clears and the query runs:
Or delete the question marks, and it runs.