I wonder why none from the suggested replacements worked... Maybe there is a bug in Nintex parsing the query... Dunno
I'm glad you worked it out. Can you mark any from the above answers as correct (or yours), or in case not - I will just mark the post as "assumed answered".
Regards,
Tomasz