Ah, Doh! I was looking at the wrong parameter. I had assumed it was the Date parameter causing the trouble but it was another seemingly innocent parameter we had been passing into the query - not shown above in the 'cut down' version of the query.
Not sure how the full query in question in the app ever worked .... hmmmm. I think it was only used for some data migrations that never went ahead so that probably explains how it "not working" was not a problem in the app.